Skip to content

fix: quota error disambiguation, img2img params, stale model count (#61 #62 #63)#65

Merged
stackbilt-admin merged 5 commits into
mainfrom
fix/quota-errors-img2img-model-count
Jun 15, 2026
Merged

fix: quota error disambiguation, img2img params, stale model count (#61 #62 #63)#65
stackbilt-admin merged 5 commits into
mainfrom
fix/quota-errors-img2img-model-count

Conversation

@stackbilt-admin

Copy link
Copy Markdown
Member

Summary

Not in this PR

Test plan

  • tools/listimage_generate schema includes input_image, mask_image, input_strength, strength
  • tools/listimage_list_models description has no hardcoded count
  • Exhaust plan quota → error reason is quota_exhausted, message includes reset date + quota_limit
  • Zero balance (no plan, no credits) → error reason is insufficient_credits, message includes purchase URL
  • image_generate with RunwayML cf_model + input_image reaches img-forge backend unchanged

🤖 Generated with Claude Code

Kurt Overmier and others added 5 commits June 15, 2026 07:51
…63)

When a subscriber's monthly plan allocation is exhausted and they also
have no credit pack balance, the gateway now returns reason=quota_exhausted
with quota_resets_at (ISO 8601) instead of the generic insufficient_credits
error — telling them when quota resets rather than directing them to buy
credits as their only option.

Credit-only users (free tier, unsubscribed) still get insufficient_credits.
Consumes the reason + quota_resets_at fields added in edge-auth#153.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Error message now reads: "Monthly image quota exhausted. Top off at
https://stackbilder.com/img-forge#credits or wait for reset on July 1, 2026."

Previous version omitted the URL (leaving users with no actionable next step
in terminals that only show the message string) and the year (ambiguous for
December users).

Also applied same "Top off at <url>" phrasing to insufficient_credits.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Error now reads: "Monthly image quota exhausted (N images/mo). Add credits
from $9.99 at https://stackbilder.com/img-forge#credits — or wait for
reset on [date]."

quota_limit threads from edge-auth QuotaResult → QuotaCheckResult → message.
Price anchor ($9.99) is the smallest credit pack entry point — gives users
a cost signal before they navigate to the purchase page.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
… img2img params

image_list_models: description no longer hardcodes "13 models / 11 CF models" — live
model count comes from img-forge; gateway description was stale after #61.

image_generate: adds input_image, mask_image, input_strength, strength to inputSchema
so RunwayML img2img/inpainting cf_model values are actually callable. cf_model
description now calls out that RunwayML variants require input_image.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
TIER_ALLOWED_QUALITY had Gemini blocked with a "re-add when capacity
confirmed" comment. Capacity is confirmed; tool descriptions already
promise ultra_plus to Pro plan users. Aligns code with contract.

Fixes failing test: allows pro-tier user who passes model=gemini-3-pro-image-preview

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@stackbilt-admin stackbilt-admin merged commit bbba618 into main Jun 15, 2026
1 check passed
@stackbilt-admin stackbilt-admin deleted the fix/quota-errors-img2img-model-count branch June 15, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant