Skip to content

fix(opencode): install openai websocket fetch for configured keys#29842

Open
Chikage0o0 wants to merge 2 commits into
anomalyco:devfrom
Chikage0o0:fix/openai-config-api-key-ws
Open

fix(opencode): install openai websocket fetch for configured keys#29842
Chikage0o0 wants to merge 2 commits into
anomalyco:devfrom
Chikage0o0:fix/openai-config-api-key-ws

Conversation

@Chikage0o0
Copy link
Copy Markdown

@Chikage0o0 Chikage0o0 commented May 29, 2026

Issue for this PR

Fixes #29843

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Installs the OpenAI plugin WebSocket fetch when API auth comes from provider config (provider.openai.options.apiKey) or env (OPENAI_API_KEY) and no stored auth entry exists. The previous loader only ran when auth.get("openai") returned saved auth, so configured keys could build the provider but miss the WebSocket fetch needed for Responses/WebSocket calls.

Stored OpenAI auth still takes precedence when present, preserving opencode auth login openai behavior.

How did you verify your code works?

  • bun test test/provider/provider.test.ts --timeout 30000
  • bun typecheck
  • pre-push hook: bun turbo typecheck

Screenshots / recordings

N/A — not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels May 29, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions Bot removed needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels May 29, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

OpenAI websocket fetch is not installed for configured API keys

1 participant