Skip to content

Stale serverInfo.quotaHints credit range — says "1-20 credits", actual is 5-40 #44

@stackbilt-admin

Description

@stackbilt-admin

Summary

gateway.ts:1435 sets the serverInfo.quotaHints.free.note to:

"25 credits/mo. image_generate costs 1-20 credits depending on quality tier."

The "1-20" range is wrong. cost-attribution.ts defines image_generate with baseCost: 5 and a IMAGE_QUALITY_MULTIPLIER table of {draft: 1, standard: 1, premium: 3, ultra: 5, ultra_plus: 8}, so actual per-call costs are:

Quality Cost
draft 5
standard 5
premium 15
ultra 25
ultra_plus 40

Range is 5-40, not 1-20. A client parsing serverInfo to budget calls will under-estimate by up to 2x on the low end and miss ultra_plus entirely.

Proposed fix

Update the free-tier note (and audit the hobby/pro/enterprise notes while we're there) against the cost-attribution source of truth. Ideally derive the range programmatically from TOOL_COSTS['image_generate'].baseCost × IMAGE_QUALITY_MULTIPLIER so it can't drift again.

Context

Cosmetic but misleading. Caught during PR #26 review alongside the tier_denied/quota_exceeded and /api/scaffold bypass items.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions