Skip to content

pricing: a non-USD unit on a hostless or "*" block unprices the bundled table everywhere #1190

Description

@huang195

Found by an independent review of #1153 at 80348bf (and raised by pdettori there as a suggestion); deferred by the author's call.

After #1153 a unit is host-wide, and only rows in an endpoint's unit may price its traffic. A block with unit: and no hosts: (or hosts: ["*"]) covers every endpoint, so every endpoint no more specific block names takes that unit — and the bundled dollar table stops pricing anything there.

Measured at 80348bf with hosts: ["*"], unit: credits, models: {premium-ide} and the bundled table on:

api.anthropic.com  claude-opus-4-1   unit=credits  prov=none

At a66911e the same request was unit=USD prov=bundled. The unpricing is loud (unpricedBy names every pair); the other half is silent: a charge any of those endpoints reports itself is labelled credits.

Shape of a fix

Refuse a non-USD unit: on a hostless or "*" block at startup, beside the multiplier-only refusal — a unit is a gateway's, so its hosts should be named — with one row added to TestConfig_AUnitOnAMultiplierOnlyBlockIsRefused's table or a sibling.

Assisted-By: Claude (Anthropic AI) noreply@anthropic.com

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions