Skip to content

Support Anthropic fast mode (priority service tier) #1381

Description

@charles-cooper

Summary

Claude Code introduced "fast mode" — same Opus 4.6 model but with an API configuration that prioritizes speed over cost efficiency. It uses the service_tier parameter on the Anthropic Messages API.

Reference: https://code.claude.com/docs/en/fast-mode

Current SDK state

  • @anthropic-ai/sdk 0.74.0 (latest) supports service_tier?: "auto" | "standard_only" on request, and "standard" | "priority" | "batch" on response.
  • service_tier: "auto" opts into priority routing when available.
  • pi-mono currently pins SDK 0.71.2, package.json specifies ^0.73.0.

What to implement

packages/ai

  1. Upgrade @anthropic-ai/sdk to latest (0.74.0+) to get current service_tier types.
  2. Add serviceTier option to AnthropicOptions — pass through to the API as service_tier.
  3. Expose in SimpleStreamOptions so callers can opt in without using provider-specific options.
  4. Surface service_tier from response in usage/metadata events so callers know which tier was actually used.

packages/coding-agent

  1. Add /fast slash command (or equivalent toggle) that sets service_tier: "auto" on the Anthropic provider.
  2. Persist fast mode across sessions (settings file).
  3. Show indicator in status line when fast mode is active.
  4. Auto-fallback: if rate-limited on priority tier, fall back to standard and indicate cooldown.

Pricing context (for docs/UI)

Mode Input (MTok) Output (MTok)
Fast (<200K) $30 $150
Fast (>200K) $60 $225

Fast mode is billed to extra usage even if plan usage remains. Only available via Anthropic API (not Bedrock/Vertex/Azure).

Notes

  • The SDK input type may expand beyond "auto" | "standard_only" in future versions. Watch for updates.
  • Fast mode can be combined with effort level for maximum speed on simple tasks.
  • Consider whether this should generalize to other providers that have similar tiering (e.g., OpenAI service_tier).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions