Summary
Add first-class AI provider support for DeepSeek and xAI Grok.
Cloudflare OS currently supports a fixed set of providers and allows custom model IDs under those providers, but DeepSeek and xAI/Grok are not represented as providers in the UI or in the provider type/routing layer. Users can sometimes work around this through the generic OpenAI-compatible path, but that does not provide a clear provider-specific setup or guarantee compatibility with the request format used by the agent loop.
Why
Both services expose OpenAI-compatible APIs:
- DeepSeek:
https://api.deepseek.com
- xAI:
https://api.x.ai/v1
References:
Adding them as first-class providers would make setup discoverable and allow provider-specific model metadata and compatibility handling.
Proposed scope
- Add
deepseek and xai to AiModelProvider.
- Add provider labels, default API URLs, API-token hints, and suggested/current model IDs.
- Route both providers through the appropriate
pi-ai streaming adapter.
- Preserve support for custom model IDs.
- Verify streaming responses, tool calls, reasoning output, image capability metadata, and multi-turn agent runs.
- Add unit/integration coverage with mocked provider endpoints.
- Keep the existing generic OpenAI-compatible configuration working unchanged.
If maintaining two separate provider types is undesirable, a generic OpenAI-compatible provider with DeepSeek and xAI presets would also solve the setup/discoverability problem.
Acceptance criteria
- A user can select DeepSeek or xAI/Grok from AI Providers without pretending it is OpenAI.
- The default endpoint and credential instructions are shown automatically, while allowing an API URL override where appropriate.
- At least one current DeepSeek model and one current Grok model can complete a normal chat and an agent tool-call loop.
- Model capability metadata prevents unsupported attachments or features from being sent.
- Existing OpenAI, Anthropic, Google, Cloudflare Workers AI, and Ollama configurations are not regressed.
Summary
Add first-class AI provider support for DeepSeek and xAI Grok.
Cloudflare OS currently supports a fixed set of providers and allows custom model IDs under those providers, but DeepSeek and xAI/Grok are not represented as providers in the UI or in the provider type/routing layer. Users can sometimes work around this through the generic OpenAI-compatible path, but that does not provide a clear provider-specific setup or guarantee compatibility with the request format used by the agent loop.
Why
Both services expose OpenAI-compatible APIs:
https://api.deepseek.comhttps://api.x.ai/v1References:
Adding them as first-class providers would make setup discoverable and allow provider-specific model metadata and compatibility handling.
Proposed scope
deepseekandxaitoAiModelProvider.pi-aistreaming adapter.If maintaining two separate provider types is undesirable, a generic OpenAI-compatible provider with DeepSeek and xAI presets would also solve the setup/discoverability problem.
Acceptance criteria