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
Configured credentialless providers require an empty API key #42790
In V2, Catalog.provider.available() treats any string-valued settings.apiKey, including an empty string, as an enablement signal. A provider explicitly added through config can therefore remain unavailable when it has no active Integration connection unless users set apiKey: "". The resolver then also interprets that empty value as a request to suppress native provider authentication.
Provider activation should be modeled independently from credentials. Configured providers should be explicitly enabled, automatic providers should derive availability from Integration state, and disabled providers should remain unavailable. For explicitly enabled API-key routes with no resolved or configured credential, Core should use Auth.none without replacing provider-owned auth such as Bedrock SigV4.
Steps to reproduce
Configure a custom Google or xAI gateway with a baseURL and custom authentication header.
Do not configure a provider API key or active Integration credential.
Observe that the provider is absent unless settings.apiKey is set to an empty string.
Catalog.provider.available treats any string request.body.apiKey as an enablement signal, including "". An integration-backed provider with custom baseURL/headers and no credential stays unavailable unless you set apiKey: "".
That empty string then goes through SessionRunnerModel’s apiKey() as Auth.value(""), which fails with missing credential instead of Auth.none (omitting the key is fine).
Live: unit repro on this HEAD — (a) no apiKey → absent from provider.available(), (b) apiKey: "" → present, (c) empty key auth apply → Failure, (d) omitted key → Auth.none.
Prior #44418 never landed and targeted the old aisdk-native mapper. On this tree the leaf is:
Thanks for the report. I couldn't reproduce this on v2.2.0, the latest release, since the issue doesn't give a version number.
What I tried:
No provider API key, no env vars and no Integration connection.
A config entry for xai and one for google, each with only settings.baseURL and a custom header (no apiKey).
What happened:
opencode models listed both providers without apiKey: "". Without the config entry, neither was listed.
opencode run sent requests without credentials, so native auth was skipped without an empty key.
The current dev code (ced73dc0f) already models this the way you describe:
Configured providers get activation: "enabled".
auto providers derive availability from Integration state.
disabled providers stay unavailable.
ModelResolver falls back to Auth.none only for enabled API-key packages that have no resolved or configured credential, so provider-owned auth like Bedrock SigV4 is left alone.
If you still see the provider missing, the exact commit or version and the config you used would help.
Separately, my requests went to the real xAI/Google endpoints, not the mock server at the configured baseURL. I didn't check whether that's a bug or a mistake in my config.
Activity
kvnloo commentedon Sep 15, 2026
Re-checked on current
dev(e03db9b).Still broken:
Catalog.provider.availabletreats any stringrequest.body.apiKeyas an enablement signal, including"". An integration-backed provider with custombaseURL/headers and no credential stays unavailable unless you setapiKey: "".SessionRunnerModel’sapiKey()asAuth.value(""), which fails with missing credential instead ofAuth.none(omitting the key is fine).Live: unit repro on this HEAD — (a) no apiKey → absent from
provider.available(), (b)apiKey: ""→ present, (c) empty key auth apply → Failure, (d) omitted key → Auth.none.Prior #44418 never landed and targeted the old
aisdk-nativemapper. On this tree the leaf is:packages/core/src/catalog.ts(typeof … === "string")packages/core/src/session/runner/model.ts(apiKey()empty →Auth.value)Happy to send a tiny issue-linked fix treating
""as unset in both places if that’s wanted.opencodejr commentedon Oct 28, 2026
Thanks for the report. I couldn't reproduce this on v2.2.0, the latest release, since the issue doesn't give a version number.
What I tried:
xaiand one forgoogle, each with onlysettings.baseURLand a custom header (noapiKey).What happened:
opencode modelslisted both providers withoutapiKey: "". Without the config entry, neither was listed.opencode runsent requests without credentials, so native auth was skipped without an empty key.The current
devcode (ced73dc0f) already models this the way you describe:activation: "enabled".autoproviders derive availability from Integration state.disabledproviders stay unavailable.ModelResolverfalls back toAuth.noneonly for enabled API-key packages that have no resolved or configured credential, so provider-owned auth like Bedrock SigV4 is left alone.If you still see the provider missing, the exact commit or version and the config you used would help.
Separately, my requests went to the real xAI/Google endpoints, not the mock server at the configured
baseURL. I didn't check whether that's a bug or a mistake in my config.Tarquinen commentedon Nov 2, 2026
This was fixed by #60770: providers that don't need credentials can now set
apiKey: false. It will ship in the next release. Closing this issue.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊