Skip to content

fix(cloudflare): correct 16 Workers AI catalog prices against live API - #102

Closed
stackbilt-admin wants to merge 2 commits into
mainfrom
fix/cf-workers-ai-pricing-audit
Closed

stackbilt-admin wants to merge 2 commits into
mainfrom
fix/cf-workers-ai-pricing-audit

Conversation

@stackbilt-admin

Copy link
Copy Markdown
Member

Summary

Audited every @cf/ text-generation catalog entry against the live account /ai/models/search API (2026-07-22). 16 entries were wrong:

  • 12 metered models listed as free ($0/$0) — including kimi-k2.6/kimi-k2.7-code (actually $0.95/$4.00 per M) and qwen2.5-coder-32b ($0.66/$1.00). Consumers computing spend from usage.cost (e.g. the AEGIS cheap_llm_ledger) have been under-reporting Workers AI costs and overstating savings.
  • gpt-oss-120b was 1000× too high ($350/$750 per M — per-M prices entered in the per-token fields).
  • llama-4-scout and llama-3.2-11b-vision had stale rates.

All values are USD-per-token derived from live per-M prices. Nothing on Workers AI text generation is free.

Test plan

  • 487/487 existing tests pass
  • Diff verified to touch only inputTokenCost/outputTokenCost lines (32 pairs)
  • Downstream verified live: aegis agent-llm route now reports real costs for @cf/ models (e.g. glm-4.7-flash run: $0.0002, previously $0.0000)

Notes

  • Branch based on 0aff4c2 (current origin tip lineage), not the local WIP checkout.
  • aegis carries corrected fallback tables (CF_MODEL_PRICING / MODEL_PRICING, shipped v2.38.2) until this publishes — safe to merge and publish in any order.

🤖 Generated with Claude Code

stackbilt-admin and others added 2 commits July 22, 2026 20:22
…I (2026-07-22 audit)

Audited every @cf/ text-generation entry against the account-level
/ai/models/search API. 16 entries were wrong:

- 12 models listed as free ($0/$0) that are metered — including
  kimi-k2.6/k2.7-code ($0.95/$4.00) and qwen2.5-coder-32b ($0.66/$1.00),
  which consumers (aegis cheap-llm/agent-llm ledgers) were reporting as
  $0 spend.
- gpt-oss-120b was 1000x too HIGH ($350/$750 per M — per-M prices had
  been entered in the per-token fields).
- llama-4-scout and llama-3.2-11b-vision had stale rates.

All values are USD per token (live per-M price / 1e6). 487 tests pass.

Co-Authored-By: Claude Fable 5 <[email protected]>
@stackbilt-admin

Copy link
Copy Markdown
Member Author

Superseded by #107, which carries the live pricing corrections forward in the repository's documented USD-per-1K-token units and adds regression coverage. Applying #102's per-token values directly would be divided by 1,000 again by BaseProvider.calculateCost().

stackbilt-admin added a commit that referenced this pull request Sep 1, 2026
Adds current Cloudflare-hosted models, provider-agnostic required/named tool constraints, binding-safe Workers AI continuations, hallucinated-tool guards, corrected pricing units, and v1.21.0 release metadata. Closes #106; supersedes #102.
@stackbilt-admin
stackbilt-admin deleted the fix/cf-workers-ai-pricing-audit branch September 1, 2026 12:02
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