Skip to content

fix(eyrie): stop falling back to OPENAI base URL for other providers#69

Merged
Patel230 merged 2 commits into
mainfrom
fix/eyrie-base-url-fallback
Jul 15, 2026
Merged

fix(eyrie): stop falling back to OPENAI base URL for other providers#69
Patel230 merged 2 commits into
mainfrom
fix/eyrie-base-url-fallback

Conversation

@Patel230

Copy link
Copy Markdown
Contributor

Summary

Removes OPENAI_BASE_URL / OPENAI_API_BASE from the BaseURLEnv fallback chain of every non-OpenAI provider. A stray OPENAI env var was redirecting other providers credentialed API key traffic to whatever host it pointed at. Found and fixed two independent copies of the bug: catalog/registry/providers.go (~17 providers) and config/profiles.go (~16 runtime profiles).

Why

Credential hijack vector from a whitelisted-but-mismatched env var. Audit finding.

Verification

  • go build ./..., go test ./... pass
  • Added regression test asserting anthropic resolves its base URL without falling back to OPENAI_BASE_URL

Patel230 added 2 commits July 15, 2026 09:16
…cumented

Also fixed a stale ID: the Z.AI row listed z-ai, which doesn't exist in the
registry (the real IDs are zai_coding and zai_payg, two separate providers).
Rewrote the full table from catalog/registry/providers.go directly —
deepseek, the zai/minimax split, azure, bedrock, vertex, poolside, groq,
and clinepass were all missing.
A stray OPENAI_BASE_URL / OPENAI_API_BASE in the host environment would
send a non-OpenAI provider's API key to whatever host that var points
at, because 17 providers and 16 runtime profiles ended their BaseURLEnv
lookup chain on the OpenAI vars.

Trim OPENAI_BASE_URL and OPENAI_API_BASE out of every non-OpenAI
provider's BaseURLEnv slice in catalog/registry/providers.go and every
non-OpenAI runtime profile in config/profiles.go. A provider's base URL
must come only from its own env vars. Added a regression test asserting
anthropic no longer resolves through the OpenAI vars.
@Patel230
Patel230 merged commit 1ba6929 into main Jul 15, 2026
16 checks passed
@Patel230
Patel230 deleted the fix/eyrie-base-url-fallback branch July 15, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant