feat(pi): add DeepSeek provider support - #117
Conversation
|
@zengdard is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
Register DeepSeek as a runtime provider when DEEPSEEK_API_KEY is set, enabling deepseek/deepseek-* models to be used directly without the Vercel AI Gateway. - Detect DEEPSEEK_API_KEY env var at Pi session creation - Register deepseek provider with configurable base URL - Support deepseek/deepseek-v4-flash and similar model references
|
Hi can you accept it ? or review it ? BR, |
|
Great feedback, thanks @richardchen874-sys! To answer your question: the primary intent here is cost reduction with provider-agnostic throughput — DeepSeek's OpenAI-compatible API makes it a drop-in replacement so teams can route broad-pass scans at a fraction of the cost, and the PR intentionally keeps it a runtime registration (not a config toggle) so the existing deepsec pipeline stays unchanged. Agreed on tracking phase/model/latency/usage/finding quality separately — that's exactly the right split, and it's what would make a proper cost-aware routing layer viable (cheap models for the wide pass, stronger models for severity mapping). This PR is intentionally scoped to just the provider registration; a follow-up routing layer that scores per-phase quality vs. cost would be a natural next step, and your multi-model API layer sounds complementary to it. Happy to collaborate on that if you're interested. |
Summary
Register DeepSeek as a runtime provider in the Pi SDK when
DEEPSEEK_API_KEYis set, enablingdeepseek/deepseek-*models to be used directly without the Vercel AI Gateway.Changes
packages/processor/src/agents/pi-sdk.ts: IncreatePiSession(), detectDEEPSEEK_API_KEYand register the deepseek provider with configurable base URL (DEEPSEEK_BASE_URL, defaults tohttps://api.deepseek.com/v1).Usage
Context
DeepSeek models use the OpenAI-compatible API format, so
api: "openai-completions"is used. The provider registration follows the same pattern as the existing Anthropic and OpenAI handling.Closes #—