Skip to content

[DOCS] Document Claude Code subscription mode for infer-action #276

Closed

Description

@edenreich

Summary

inference-gateway/infer-action gained a Claude Code subscription mode
(inference-gateway/infer-action#132): run the agent on a Claude Max/Pro subscription
instead of pay-per-token provider API keys, via use-claude-code-subscription: true
plus a claude-code-oauth-token. The docs site should document this mode.

What to cover:

  • Enabling the mode (use-claude-code-subscription: true) and the new inputs:
    claude-code-oauth-token, claude-code-cli-version, claude-code-max-output-tokens,
    claude-code-thinking-budget.
  • Minting the OAuth token with claude setup-token (format sk-ant-oat01-..., valid
    about 1 year, requires Claude Pro/Max), storing it as the CLAUDE_CODE_OAUTH_TOKEN
    repository secret, and rotating it before expiry.
  • No provider API key is needed in this mode; a stray ANTHROPIC_API_KEY is ignored
    (stripped by the CLI) so it cannot reroute to paid API billing.
  • The model (and any /model override) must be a bare Claude id (for example
    claude-sonnet-4-5-20250929), not a provider-prefixed id like
    anthropic/claude-opus-4-8.
  • max-turns bounds both the Infer agent loop and the Claude CLI turn limit.
  • Current metrics caveat: tool-call counts and failures render today; token usage and
    per-session cost are pending an upstream CLI fix (inference-gateway/cli) and render as
    unavailable until then.
  • Limitations: Claude models only; image inputs are dropped; prompt caching is
    unavailable. Fork PRs do not run this mode because the secret is not exposed to fork
    workflows.

Affected pages: the infer-action action documentation (inputs reference plus a new
"Claude Code subscription mode" section/page). Include the example workflow shipped at
examples/claude-code-subscription.yml.

Link: inference-gateway/infer-action#132 and its implementing PR.

Acceptance Criteria

  • A "Claude Code subscription mode" section or page documents enabling the mode,
    minting/storing/rotating the OAuth token, and the no-provider-key requirement.
  • The bare-Claude-id requirement and the metrics caveat (tokens/cost pending the
    upstream CLI fix) are documented.
  • The new inputs appear in the infer-action inputs reference.
  • An example workflow is included.

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

    Source PR: inference-gateway/infer-action#133 (adds the Claude Code subscription mode this ticket documents).

  5. edenreich commented on Jun 24, 2026

    @edenreich
    ContributorAuthor

    @claude Can you document it?

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

    @inference-gateway-maintainer
    Contributor

    Claude finished @edenreich's task in 8m 41s —— View job • docs/issue-276-20260624-1642 • [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-276-20260624-1642?quick_pull=1&title=Issue%20%23276%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23276%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)


    Documenting Claude Code subscription mode for infer-action

    • Read existing github-action.md and sidebar config
    • Review source PR (infer-action#133) + action.yml + example workflow for accuracy
    • Add new inputs to the inputs reference
    • Add a "Claude Code subscription mode" section (enabling, OAuth token mint/store/rotate, no-provider-key)
    • Document bare-Claude-id requirement and metrics caveat
    • Add example workflow
    • Run lint:md, format, and build (all pass)
    • Commit and open PR

    Summary

    Added a Claude Code subscription mode section to the GitHub Action reference page (github-action.md). It documents:

    • Enabling the mode - use-claude-code-subscription: true + claude-code-oauth-token, the gated claude CLI install step, and that INFER_GATEWAY_RUN=false / no provider key is used (a stray ANTHROPIC_API_KEY is stripped by the CLI).
    • OAuth token lifecycle - minting with claude setup-token (sk-ant-oat01-..., ~1yr, needs Claude Pro/Max), storing as the CLAUDE_CODE_OAUTH_TOKEN repo secret, and rotating before expiry.
    • The five new inputs in a dedicated table, plus a pointer from the main Inputs section (mirroring the existing OpenTelemetry pattern).
    • Bare-Claude-id requirement (e.g. claude-sonnet-4-5-20250929, not anthropic/claude-opus-4-8) and the max-turns dual-bound note.
    • Metrics caveat - tool calls/failures render today; tokens + cost omitted pending inference-gateway/cli#649.
    • Limitations - Claude models only, image inputs dropped, prompt caching unavailable, no fork-PR support.
    • The full example workflow from examples/claude-code-subscription.yml.

    All four acceptance criteria are covered. Verified with bun run lint:md, bun run format:check, and bun run build (all green), and confirmed the new content is present in the server-rendered dist HTML.

    Note: the feature is merged to infer-action@main but not yet in a tagged release (latest v0.17.2), so examples use @main with a release-status callout, matching the upstream example file. The docs should be re-pinned to the next tag once it ships.

    Pull request: #277

    --- · branch docs/issue-276-20260624-1642

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

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.6.113 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

  10. moved this from QA to Done in 2026on Jun 24, 2026
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