anomalyco / anomalyco/opencode
[FEATURE]: Support keyless custom OpenAI-compatible providers
Open
@jlongster is already working on this.
Since Aug 14, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- Avg merge
- 7h 2m
- Merged PRs (30d)
- 384
Description
Feature hasn't been suggested before.\n\n- [x] I have verified this feature I'm about to request hasn't been suggested before.\n\n### Describe the enhancement you want to request\n\nAllow OpenCode’s native LLM runtime to use custom @ai-sdk/openai-compatible providers without requiring an API key.\n\nSelf-hosted inference services such as SGLang, vLLM, Ollama, and LM Studio are commonly configured as custom providers and may intentionally accept unauthenticated requests over a private network.\n\nThe native runtime currently rejects custom provider IDs and separately requires a non-empty API key. Together, these restrictions prevent valid self-hosted OpenAI-compatible endpoints from using the native runtime.\n\nDesired behavior:\n\n- Accept custom @ai-sdk/openai-compatible provider IDs in the native runtime.\n- Allow apiKey to be absent.\n- Send an authorization header only when a key is configured.\n- Preserve existing behavior for authenticated providers.\n\nRelated issues:\n\n- #38893 covers the native runtime’s hardcoded provider allowlist.\n- #39072 covers unconditional authorization requirements for another provider.\n\nThis request covers the combined custom-provider and optional-authentication behavior needed by self-hosted OpenAI-compatible endpoints.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.