Skip to main content

Short Answer

This is Claude Code’s own cost-saving mechanism, not the gateway swapping your model. The claude-opus-5 you configured in Claude Code only drives the main conversation. Small background tasks such as generating session titles and detecting topics, plus built-in subagents like Explore, run on the cheaper Haiku model by default (for example claude-haiku-4-5-20251001), so your logs show both models. If you want every request to use Opus, force it with environment variables — see Force Everything onto Opus below.

How to Recognize Them in the Logs

In the console’s usage logs, these Haiku requests usually have three traits:
  • Same token and group as your Opus requests: same key, same ClaudeCode group, which means they come from the same Claude Code client
  • Very few tokens and a tiny cost per call: often just tens to a few hundred tokens, in clear contrast to main-conversation Opus requests that run into thousands or tens of thousands
  • They arrive in bursts that follow your actions: starting a new session, asking Claude Code to search the codebase, or dispatching subtasks
The model name is exactly what the client sent. APIYI routes and bills by the model field in the request. If you see Haiku in the logs, Claude Code asked for Haiku — those calls are billed at Haiku pricing, never at Opus pricing.

Why Claude Code Does This

Claude Code has a built-in two-tier split between a large and a small model: Background tasks and code search don’t need much model capability but run often, so Haiku cuts the overall bill noticeably and is faster too. For most people the default is the right choice.

Force Everything onto Opus

If you want every request on Opus (for example, you want higher-quality subagent searches), point every tier at the same Opus model in the env block of ~/.claude/settings.json:
Restart Claude Code after saving. Your usage logs should then show only claude-opus-5-5.
Use claude-opus-5-5 as the main model. It is newer and works better than claude-opus-5, and it is available in the ClaudeCode group — just copy the model name from the config above.
Running everything on Opus noticeably raises your cost. Background tasks and subagents fire often, and calls that used to be billed at Haiku pricing will all be billed at Opus pricing. If you only want a smarter small model, a middle ground is to set ANTHROPIC_DEFAULT_HAIKU_MODEL to the newer claude-haiku-5-5 and leave the rest at defaults.

FAQ

Check the token, IP and timeline. If the Haiku requests use the same token as your Opus requests, come from the same IP and line up with your own activity, they came from your own Claude Code. If you see unfamiliar IPs or heavy usage at times you weren’t working, treat it as a key leak — see Token Management.
/model only switches the main conversation model. It doesn’t change the model used by background helpers and subagents. To change those too, set ANTHROPIC_DEFAULT_HAIKU_MODEL and CLAUDE_CODE_SUBAGENT_MODEL as shown above.
Tools like CC Switch also just write Claude Code’s environment variables. Set the variables above to claude-opus-5-5 in the relevant provider profile — see CC Switch Setup.

Claude Code Setup Guide

Installation, APIYI configuration and common issues

Codex, ClaudeCode and Default Groups

Which token group to use for Claude Code