Skip to content

[DOCS] Update Claude Code subscription mode: anthropic/-prefixed model ids and rendered run metrics #278

Closed

Description

@edenreich

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:

  1. 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".
  2. 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".

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:

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.

Activity

  1. added
    documentation
    on Jun 24, 2026
  2. added theissue type on Jun 24, 2026
  3. moved this to Todo in 2026on Jun 24, 2026
  4. edenreich commented on Jun 24, 2026

    @edenreich
    ContributorAuthor

    @infer Can you fix the docs?

  5. inference-gateway-maintainer commented on Jun 24, 2026

    @inference-gateway-maintainer
    Contributor

    View Job

    Todos

    • Explore repository structure to find relevant files
    • Update model-id guidance: anthropic/-prefixed ids as canonical, bare ids still accepted
    • Update run-metrics caveat: token usage and per-session cost now render
    • Add note that cost is estimated, not billed
    • Update any model-id examples in inputs reference or example workflow
    • [~] Commit and push changes

    ⚠️ Infer Result: Stopped early

    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 13s

    Tokens: 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

  6. edenreich commented on Jun 24, 2026

    @edenreich
    ContributorAuthor

    @claude Please document it

  7. inference-gateway-maintainer commented on Jun 24, 2026

    @inference-gateway-maintainer
    Contributor

    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.md was the only page carrying subscription-mode content, so all edits landed there.

    What changed

    • Model ids - documented 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 the claude CLI. Renamed the subsection "Use bare Claude model ids" -> "Model ids".
    • Run metrics - token usage (per assistant turn) and per-session cost now render in this mode, so the Tokens and Cost footer lines appear. Removed the "pending an upstream CLI fix / omitted for now" caveat.
    • Cost note - added a clarification that cost is estimated from token counts via the CLI's pricing list (a subscription has no per-call billing), so it is an estimate of the equivalent pay-per-token price, not a billed subscription amount.
    • Examples - updated the enable snippet and the embedded example workflow to the anthropic/-prefixed form.

    Acceptance criteria

    • Model-id guidance: anthropic/-prefixed canonical, bare ids still accepted; "must be a bare id" statement removed
    • Run-metrics caveat updated: Tokens + Cost now render, no longer pending an upstream fix
    • Note added: cost is estimated from token counts, not a billed subscription amount
    • Model-id examples consistent with the anthropic/-prefixed convention

    Verification

    bun run lint:md, bun run format:check, and bun run build all pass locally.

    Note: the canonical examples/claude-code-subscription.yml file itself lives in the inference-gateway/infer-action repo (out of scope for this docs repo); I updated the embedded copy shown in the docs. Both bare and anthropic/-prefixed ids remain valid, so no workflow breaks.
    · branch fix/issue-278-20260624-2038

  8. moved this from Todo to In progress in 2026on Jun 24, 2026
  9. moved this from In progress to QA in 2026on Jun 24, 2026
  10. moved this from QA to Done in 2026on Jun 24, 2026
  11. inference-gateway-releaser commented on Jun 29, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.6.114 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

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

    documentationreleased

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions