=== 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:
- Configure Cloudflare Workers AI in opencode.json with custom provider name
- Run 'opencode models' - models appear in list
- Run 'opencode' - models don't appear in interactive interface
- Try using models via command line - works fine
- 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.
=== 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:
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:
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.