Skip to content

OpenAI websocket fetch is not installed for configured API keys #29843

@Chikage0o0

Description

@Chikage0o0

Description

When OpenAI API auth comes only from provider config (provider.openai.options.apiKey) or OPENAI_API_KEY, without running opencode auth login openai, the OpenAI provider has a configured key but the plugin auth loader does not install the WebSocket fetch used by OpenAI Responses/WebSocket requests. Model calls that require the WebSocket path can fail or miss that transport unless stored auth exists.

Plugins

OpenAI

OpenCode version

dev

Steps to reproduce

  1. Configure OpenAI via config with provider.openai.options.apiKey, or set OPENAI_API_KEY.
  2. Ensure no stored OpenAI auth exists, for example do not run opencode auth login openai.
  3. Enable the OpenAI WebSocket path and call an OpenAI model.
  4. Observe that the WebSocket fetch is not installed unless stored auth exists.

Expected behavior

Configured OpenAI API keys should install the WebSocket fetch the same way stored API auth does.

Actual behavior

The WebSocket fetch is only installed when stored OpenAI auth exists.

Screenshot and/or share link

N/A

Operating System

macOS

Terminal

N/A

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions