You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(ai): gateway provider sends requests and its key to ai.api_base_url instead of ai.gateway_url #455
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/aiAI review pipeline, personas, prompts, LLM client, or RAGtype/securityType security: a vulnerability or a leak
ai.api_base_url is commonly set for the openai provider (e.g. https://api.openai.com/v1) and for_task merges it into every task. A task with provider: gateway therefore sends its requests, with Authorization: Bearer <ai api key>, to the OpenAI endpoint instead of the configured gateway. The gateway master key is disclosed to a third party; OpenAI answers 401 and the request fails.
Observed while pointing devops ai chat at a LiteLLM gateway: the request went to https://api.openai.com/v1/chat/completions and carried the gateway key, which then had to be rotated.
Expected
For provider: gateway, a task-level api_base_url may override, but a global api_base_url inherited from another provider's setup must not outrank gateway_url. At minimum, never send a request for provider gateway to a host other than the gateway's.
Workaround
Set ai.tasks.<task>.api_base_url to the gateway URL.
Acceptance criteria
Provider gateway resolves to gateway_url unless the task itself sets api_base_url.
Tests cover global vs task-level api_base_url with provider gateway.
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/aiAI review pipeline, personas, prompts, LLM client, or RAGtype/securityType security: a vulnerability or a leak
Activity
fix(ai): send provider gateway requests only to the gateway
fix(ai): send provider gateway requests only to the gateway (#462)
dan-petty commentedon Sep 23, 2026
Closed by #462, merged into
release/v0.2.23.GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by
devops gh issues close-merged.feat(release): v0.2.23 (#681)