claude-sonnet-4.6 has been removed from the codexkey catalog, and requests that name it now fail. claude-sonnet-5 takes its place: same model class, same price, $0.3 per million tokens for input and for output. Wherever the old ID is still set, swap it.
What to change
One edit: put claude-sonnet-5 in the model field instead of claude-sonnet-4.6. Your key, base URL and request format stay as they are.
from anthropic import Anthropic
client = Anthropic(
api_key="sk_cdx_your_key_here",
base_url="https://api.codexkey.online",
)
message = client.messages.create(
model="claude-sonnet-5",
max_tokens=1024,
messages=[{"role": "user", "content": "Check this SQL query for N+1."}],
)
print(message.content[0].text)
The OpenAI Chat Completions format needs the same single change: same key, same https://api.codexkey.online/v1 endpoint, model set to claude-sonnet-5.
Where else the old ID can hide
.envfiles and environment variables: models are often set throughMODEL=orANTHROPIC_MODEL=.- Claude Code: the
modelfield in~/.claude/settings.jsonand in the project's.claude/settings.json. - Cursor, Cline, Continue and similar extensions: the model list under the custom provider.
- Agent configs, eval sets and tests that hardcode the model name.
One search over the repository turns up all of them:
grep -rn "claude-sonnet-4.6" .
What to check after switching
If you spent time tuning prompts for 4.6, run your typical requests on Sonnet 5 and judge the answers by your own metric, not by gut feeling. Keep the model name in config rather than in code. The next version change then costs you one line.
The current list of models and prices is always on the models page.
FAQ
Why did requests to claude-sonnet-4.6 stop working?
The model was removed from the codexkey catalog, and newer versions are served under their own IDs. Replace claude-sonnet-4.6 with claude-sonnet-5. Nothing else needs to change.
How much does claude-sonnet-5 cost?
The same as 4.6 did on codexkey: $0.3 per million tokens for input and output. Exact prices are on the models page.
Do I need a new API key?
No. An sk_cdx_... key works with every model in the catalog, and only the model field changes.
Which model should replace Sonnet 4.6 for hard tasks?
For heavy, long-context work there is Opus: claude-opus-5 and claude-opus-4.8. For everyday coding and agents, claude-sonnet-5 is usually enough.