Thread

M
michael11:59 PMOpen in Slack
Hey just curious if Claude Code is supported with Archestra without an anthropic subscription? Struggling to get Claude Code to work with the simple:
{
  "env": {
    "ANTHROPIC_BASE_URL": "<https://archestra>.<my-domain>/v1/model-router",
    "ANTHROPIC_API_KEY": "arch_<my_archestra_virtual_key>
  },
....
}```
All the docs seem to assume the user already has inference capability (eg "Ask the Agent to set this up by following the URL").

I'm trying to setup Archestra, load up say, $50 with deepseek/openrouter/etc, and wire up Claude Code or similar to use Archestra.

11 replies
M
michael12:01 AMOpen in Slack
 ▐▛███▛█   Claude Code v2.1.296
▝▜██████▀  deepseek:deepseek-flash · API Usage Billing
 ▝▝   ▝▝   /dev


❯ Hello there

● There's an issue with the selected model (deepseek:deepseek-flash). It may not exist or you may not have access to it. Run /model to
  pick a different model.

✻ Worked for 0s · done 10:44 am```
I just get similar to the above, I'm guessing the authentication bit is fine, just the BASE URL maybe isn't compatible/what Claude Code expects?
M
michael12:02 AMOpen in Slack
In the archestra logs I do see:
{"level":30,"time":1791590547643,"reqId":"req-8va","timeIso":"2026-10-10T00:02:27.643Z","url":"/v1/model-router/v1/messages?beta=true","method":"POST","statusCode":404,"responseTime":23.672743000090122,"msg":"request completed"}```
M
michael12:03 AMOpen in Slack
So maybe the v1/messages bit archestra doesn't support
M
michael12:08 AMOpen in Slack
So looks like I'd need LiteLLM infront of Archestra to support this it seems
M
michael12:11 AMOpen in Slack
Hmmm looks like bifrost supports this docs.getbifrost.ai/runbooks/claude-code-bedrock#…
They have this /anthropic endpoint that doesn't need an anthropic API Key, it just uses a virtual key
J(
joey (archestra team)12:31 AMOpen in Slack
hi there! 👋 so one thing you could try is this
setup an Anthropic Model Provider key. For the key, put your deepseek key. In the advanced section, change the base URL to point at https://api.deepseek.com/anthropic then point Claude Code at your :archestra: deployment's /v1/anthropic using a virtual key mapped to that Anthropic provider you just setup
let me know if that makes sense!
M
michael8:54 AMOpen in Slack
Thanks for that, I kinda wanted to just be local only for now, so figured I'd try with codex instead as that's OpenAI, so should work....
openai_base_url = "<https://archestra>.<my-domain>/v1/model-router"
model = "deepseek:deepseek-flash"```
Ensure `OPENAI_API_KEY` is in my env correctly set to my virtual key from Archestra.

Run `codex`:
OpenAI Codex v0.162.1
....
warning: Model metadata for deepseek:deepseek-flash not found. Defaulting to fallback metadata; this can degrade performance and cause issues.
2026-10-12T08:51:47.203793Z ERROR codexapi::endpoint::responseswebsocket: failed to connect to websocket: HTTP error: 400 Bad Request, url: <wss://archestra>.<my-domain>/v1/model-router/responses
2026-10-12T08:51:47.297933Z ERROR codexapi::endpoint::responseswebsocket: failed to connect to websocket: HTTP error: 400 Bad Request, url: <wss://archestra>.<my-domain>/v1/model-router/responses
ERROR: Bad Request
ERROR: Bad Request```
So interesting that codex seems to want to do websockets first.... let me try work around that....
M
michael9:09 AMOpen in Slack
okey dokey so finally got it working with codex!
model = "deepseek:deepseek-flash"
model_provider = "custom_provider"

[model_providers.custom_provider]
name = "Archestra"
base_url = "<https://archestra>.<my-domain>/v1/model-router/"
env_key = "OPENAI_API_KEY"
requires_openai_auth = false
supports_websockets = false
wire_api = "responses"```
And then just ensure `OPENAI_API_KEY` is exported and available! Can be any env var too.

And that works nicely:
OpenAI Codex v0.162.1
--------
....
--------
user
Hello!
warning: Model metadata for deepseek:deepseek-flash not found. Defaulting to fallback metadata; this can degrade performance and cause issues.
codex
Hey! I'm here and ready to help with your repo. What are you working on today?
tokens used
6,481```
M
michael9:10 AMOpen in Slack
That uses the model router, and just means I need a single virtual key per-user and don't need to pass around any underlying API keys too!
M
michael9:10 AMOpen in Slack
Nice!
M
michael9:15 AMOpen in Slack
Found github.com/openai/codex/issues/27381 as well, I wonder if archestra supports a websockets option here?
I guess this is very protocol specific and unique to like codex /etc and not some normal comms method