Cloudflare Workers AI models not appearing in interactive interface #1470

Closed
opened 2026-02-16 17:31:07 -05:00 by yindo · 2 comments
Owner

Originally created by @security-labz-admin on GitHub (Aug 24, 2025).

Originally assigned to: @thdxr on GitHub.

=== OPENCODE CLOUDFLARE WORKERS AI BUG REPORT ===

Title: Cloudflare Workers AI models not appearing in interactive interface

Description:
When configuring Cloudflare Workers AI models in opencode.json, they appear when running 'opencode models' but don't show up as selectable options in the interactive interface.

Steps to reproduce:

  1. Configure Cloudflare Workers AI in opencode.json with custom provider name
  2. Run 'opencode models' - models appear in list
  3. Run 'opencode' - models don't appear in interactive interface
  4. Try using models via command line - works fine
  5. Try selecting in interface - models not available

Expected behavior:
Cloudflare Workers AI models should be selectable in the interactive interface.

Actual behavior:
Models only work via command line, not visible in interface.

Environment:

  • opencode version: 0.5.15
  • OS: Linux
  • Provider: Cloudflare Workers AI

Workaround:
Use 'openai' provider instead of custom provider name:

Working config:
{
"model": "openai/@cf/meta/llama-3.1-8b-instruct",
"provider": {
"openai": {
"npm": "@ai-sdk/openai-compatible",
"name": "Cloudflare Workers AI (via OpenAI)",
"options": {
"baseURL": "https://api.cloudflare.com/client/v4/accounts/YOUR_ACCOUNT_ID/ai/v1",
"apiKey": "YOUR_API_KEY"
},
"models": {
"@cf/meta/llama-3.1-8b-instruct": {
"name": "Llama 3.1 8B Instruct"
}
}
}
}
}

Broken config:
{
"model": "cloudflare-workers-ai/@cf/meta/llama-3.1-8b-instruct",
"provider": {
"cloudflare-workers-ai": {
"npm": "@ai-sdk/openai-compatible",
"name": "Cloudflare Workers AI",
"options": {
"baseURL": "https://api.cloudflare.com/client/v4/accounts/YOUR_ACCOUNT_ID/ai/v1"
},
"models": {
"@cf/meta/llama-3.1-8b-instruct": {
"name": "Llama 3.1 8B Instruct"
}
}
}
}
}

Impact:
This affects user experience by making Cloudflare Workers AI models only accessible via command line, not through the interactive interface that most users prefer.

Originally created by @security-labz-admin on GitHub (Aug 24, 2025). Originally assigned to: @thdxr on GitHub. === OPENCODE CLOUDFLARE WORKERS AI BUG REPORT === Title: Cloudflare Workers AI models not appearing in interactive interface Description: When configuring Cloudflare Workers AI models in opencode.json, they appear when running 'opencode models' but don't show up as selectable options in the interactive interface. Steps to reproduce: 1. Configure Cloudflare Workers AI in opencode.json with custom provider name 2. Run 'opencode models' - models appear in list 3. Run 'opencode' - models don't appear in interactive interface 4. Try using models via command line - works fine 5. Try selecting in interface - models not available Expected behavior: Cloudflare Workers AI models should be selectable in the interactive interface. Actual behavior: Models only work via command line, not visible in interface. Environment: - opencode version: 0.5.15 - OS: Linux - Provider: Cloudflare Workers AI Workaround: Use 'openai' provider instead of custom provider name: Working config: { "model": "openai/@cf/meta/llama-3.1-8b-instruct", "provider": { "openai": { "npm": "@ai-sdk/openai-compatible", "name": "Cloudflare Workers AI (via OpenAI)", "options": { "baseURL": "https://api.cloudflare.com/client/v4/accounts/YOUR_ACCOUNT_ID/ai/v1", "apiKey": "YOUR_API_KEY" }, "models": { "@cf/meta/llama-3.1-8b-instruct": { "name": "Llama 3.1 8B Instruct" } } } } } Broken config: { "model": "cloudflare-workers-ai/@cf/meta/llama-3.1-8b-instruct", "provider": { "cloudflare-workers-ai": { "npm": "@ai-sdk/openai-compatible", "name": "Cloudflare Workers AI", "options": { "baseURL": "https://api.cloudflare.com/client/v4/accounts/YOUR_ACCOUNT_ID/ai/v1" }, "models": { "@cf/meta/llama-3.1-8b-instruct": { "name": "Llama 3.1 8B Instruct" } } } } } Impact: This affects user experience by making Cloudflare Workers AI models only accessible via command line, not through the interactive interface that most users prefer.
yindo closed this issue 2026-02-16 17:31:07 -05:00
Author
Owner

@security-labz-admin commented on GitHub (Aug 24, 2025):

For reference:

The model on Workers AI
We’re landing these new models with a few tweaks: supporting the new Responses API format as well as the historical Chat Completions API format (coming soon). The Responses API format is recommended by OpenAI to interact with their models, and we’re excited to support that on Workers AI.

If you call the model through:

Workers Binding, it will accept/return Responses API – env.AI.run(“@cf/openai/gpt-oss-120b”)

REST API on /run endpoint, it will accept/return Responses API – https://api.cloudflare.com/client/v4/accounts/<account_id>/ai/run/@cf/openai/gpt-oss-120b

REST API on new /responses endpoint, it will accept/return Responses API – https://api.cloudflare.com/client/v4/accounts/<account_id>/ai/v1/responses

REST API for OpenAI Compatible endpoint, it will return Chat Completions (coming soon)– https://api.cloudflare.com/client/v4/accounts/<account_id>/ai/v1/chat/completions

curl https://api.cloudflare.com/client/v4/accounts/<account_id>/ai/v1/responses
-H "Content-Type: application/json"
-H "Authorization: Bearer $CLOUDFLARE_API_KEY"
-d '{
"model": "@cf/openai/gpt-oss-120b",
"reasoning": {"effort": "medium"},
"input": [
{
"role": "user",
"content": "What are the benefits of open-source models?"
}
]
}'

@security-labz-admin commented on GitHub (Aug 24, 2025): **For reference:** - https://developers.cloudflare.com/workers-ai/ - https://developers.cloudflare.com/workers-ai/configuration/open-ai-compatibility/ - https://developers.cloudflare.com/workers-ai/models/ - https://developers.cloudflare.com/workers-ai/models/gpt-oss-120b/ - https://blog.cloudflare.com/openai-gpt-oss-on-workers-ai/ - https://openai.com/index/gpt-oss-model-card/ **The model on Workers AI** We’re landing these new models with a few tweaks: supporting the new [Responses API](https://platform.openai.com/docs/api-reference/responses) format as well as the historical [Chat Completions API](https://platform.openai.com/docs/guides/text?api-mode=chat) format (coming soon). The Responses API format is recommended by OpenAI to interact with their models, and we’re excited to support that on Workers AI. If you call the model through: Workers Binding, it will accept/return Responses API – env.AI.run(“@cf/openai/gpt-oss-120b”) REST API on /run endpoint, it will accept/return Responses API – https://api.cloudflare.com/client/v4/accounts/<account_id>/ai/run/@cf/openai/gpt-oss-120b REST API on new /responses endpoint, it will accept/return Responses API – https://api.cloudflare.com/client/v4/accounts/<account_id>/ai/v1/responses REST API for OpenAI Compatible endpoint, it will return Chat Completions (coming soon)– https://api.cloudflare.com/client/v4/accounts/<account_id>/ai/v1/chat/completions curl https://api.cloudflare.com/client/v4/accounts/<account_id>/ai/v1/responses \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $CLOUDFLARE_API_KEY" \ -d '{ "model": "@cf/openai/gpt-oss-120b", "reasoning": {"effort": "medium"}, "input": [ { "role": "user", "content": "What are the benefits of open-source models?" } ] }'
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

@rekram1-node commented on GitHub (Dec 27, 2025): [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1470