#15197: fix: allow OpenAI auth profiles for OpenAI-compatible providers
agents
stale
size: XS
Cluster:
Model Authentication Enhancements
Fixes #15096. OpenAI-compatible providers (openai-completions/responses) now accept OpenAI auth profiles when provider-specific profiles are absent.
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This change updates `resolveAuthProfileOrder` to treat providers configured with `api: "openai-completions"` or `api: "openai-responses"` as OpenAI-compatible, allowing them to use `openai` auth profiles when provider-specific profiles are not present.
The logic is implemented by expanding the provider match filter (`allowedProviderKeys`) and adding a fallback to `listProfilesForProvider(store, "openai")` when an OpenAI-compatible provider has no profiles/order entries of its own. This affects how provider auth selection works anywhere `resolveAuthProfileOrder` is used (e.g., resolving API keys for provider requests).
<h3>Confidence Score: 4/5</h3>
- This PR looks safe to merge; it’s a targeted change with straightforward control-flow updates.
- Reviewed the only modified file end-to-end and traced key helpers (`normalizeProviderId`, `listProfilesForProvider`) and the main caller (`resolveApiKeyForProvider`). The new allowlist/fallback behavior appears consistent with the PR intent and doesn’t introduce obvious runtime errors. Main remaining risk is behavior change without dedicated regression tests for the new OpenAI-compatible path.
- src/agents/auth-profiles/order.ts
<sub>Last reviewed commit: 6ac2be0</sub>
<!-- greptile_other_comments_section -->
<sub>(4/5) You can add custom instructions or style guidelines for the agent [here](https://app.greptile.com/review/github)!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#12059: feat(agents): Add Azure AI Foundry credential support
by lisanyambere · 2026-02-08
79.1%
#7570: fix: allow models from providers with auth profiles configured
by DonSqualo · 2026-02-03
78.8%
#14508: fix(models): allow forward-compat models in allowlist check
by jonisjongithub · 2026-02-12
78.7%
#7767: fix: enable turn validation for all non-OpenAI providers to prevent...
by sohail22dec · 2026-02-03
77.8%
#14368: fix: skip auth profile cooldown on format errors to prevent provide...
by koatora20 · 2026-02-12
76.9%
#13295: feat: add Eternal AI provider integration
by peterparkernho · 2026-02-10
76.8%
#15205: fix(models): normalize google-antigravity api field from google-gem...
by wboudy · 2026-02-13
76.7%
#9583: fix(models): allow models in agents.defaults.models even if not in ...
by hotzen100 · 2026-02-05
76.6%
#14187: fix: add Moonshot AI to non-standard provider detection
by shad0wca7 · 2026-02-11
76.5%
#3196: docs: clarify auth-profiles.json format for Claude Max setup-tokens
by aadeina · 2026-01-28
76.4%