Repository navigation
Labels
Description
Summary
inference-gateway/cli#650 (closes inference-gateway/cli#649) surfaces token usage and
per-session cost in the CLI's Claude Code mode and changes the Claude Code model-id
convention. Two statements in the closed/released docs#276 are now stale, so the published
"Claude Code subscription mode" documentation needs an update.
What changed:
-
Model ids are now anthropic/-prefixed.
- Claude Code mode now uses anthropic/-prefixed ids (for example
anthropic/claude-sonnet-4-5-20250929), the same convention as gateway mode and the
pricing table. - Bare Claude ids (for example claude-sonnet-4-5-20250929) are still accepted and
normalized for back-compat, so existing workflows keep working. - The CLI strips the provider prefix before invoking the claude CLI.
- This replaces the prior statement that the model "must be a bare Claude id, not a
provider-prefixed id".
- Claude Code mode now uses anthropic/-prefixed ids (for example
-
Run metrics now render in Claude Code mode.
- Token usage (per assistant turn) and per-session cost now appear, so the infer-action
footer renders the Tokens and Cost lines with no action-side change. - Cost is estimated from token counts via the CLI's own pricing list (consistent with how
Claude Code itself estimates cost from a bundled price table); a subscription has no
per-call billing, so this is an estimate, not a billed amount. - Remove the prior caveat that token usage and per-session cost are "pending an upstream
CLI fix" or "unavailable".
- Token usage (per assistant turn) and per-session cost now appear, so the infer-action
Affected pages:
- The infer-action "Claude Code subscription mode" section/page (model-id guidance plus the
run-metrics caveat). - The infer-action inputs reference, if it shows a model-id example.
- The example workflow (examples/claude-code-subscription.yml) may keep a bare id (still
valid) or move to the anthropic/-prefixed canonical form.
Links:
- Source PR: feat(claude-code): surface token usage and cost in headless mode cli#650
- Issue: [FEATURE] Surface token usage and cost in the Claude Code stream adapter cli#649
- Supersedes the stale parts of [DOCS] Document Claude Code subscription mode for infer-action #276 (closed/released).
Acceptance Criteria
- Model-id guidance documents anthropic/-prefixed ids as canonical, with bare ids still
accepted (back-compat); the "must be a bare id / rejects provider-prefixed" statement
is removed. - The run-metrics caveat is updated: token usage and per-session cost now render in
Claude Code mode and are no longer pending an upstream CLI fix. - A note clarifies that cost is estimated from token counts via the pricing list, not a
billed subscription amount. - Any model-id example in the inputs reference or example workflow is consistent with
the anthropic/-prefixed convention.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
edenreich commentedon Jun 24, 2026
@infer Can you fix the docs?
inference-gateway-maintainer commentedon Jun 24, 2026
View Job
Todos
The agent stopped before finishing its plan, so some work may be incomplete. It did not open a pull request, so its changes may not have been pushed to a branch.
All changes look correct. Let me update the todo list and commit the changes.
Model:
ollama_cloud/deepseek-v4-flash· Exit Code:0· Duration: 14m 13sTokens: 12,866,908 in · 43,398 out · 12,910,306 total (150 requests)
Tool calls: 155 total · 100% success rate
Triggered by edenreich · Infer Action
edenreich commentedon Jun 24, 2026
@claude Please document it
inference-gateway-maintainer commentedon Jun 24, 2026
Claude finished @edenreich's task in 6m 48s —— View job •
fix/issue-278-20260624-2038• [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...fix/issue-278-20260624-2038?quick_pull=1&title=Issue%20%23278%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23278%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)Done - Claude Code subscription mode docs updated
Opened PR #279 with the doc refresh.
github-action.mdwas the only page carrying subscription-mode content, so all edits landed there.What changed
anthropic/-prefixed ids as canonical (same convention as gateway mode and the pricing table), with bare Claude ids still accepted and normalized for back-compat. Removed the old "must be a bare id / rejects provider-prefixed id" statement and noted the CLI strips the prefix before invoking theclaudeCLI. Renamed the subsection "Use bare Claude model ids" -> "Model ids".anthropic/-prefixed form.Acceptance criteria
anthropic/-prefixed canonical, bare ids still accepted; "must be a bare id" statement removedanthropic/-prefixed conventionVerification
bun run lint:md,bun run format:check, andbun run buildall pass locally.inference-gateway-releaser commentedon Jun 29, 2026
🎉 This issue has been resolved in version 0.6.114 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀