Continue.dev integration
Continue.dev with Plan2API: config.yaml for Claude, GPT, Gemini and Kimi
Continue reaches Plan2API through its built-in openai provider. Add 1 model entry per Plan2API model with apiBase https://api.plan2api.com/v1 and 3 roles (chat, edit, apply), and one p2a_ key serves Claude, GPT, Gemini and Kimi. Tab autocomplete and embeddings need a different model.
- provider
- openai
- apiBase
- https://
api.plan2api.com/ v1 - roles
- chat, edit, apply
- GPT models need
- useResponsesApi: false
Updated
Continue settings for Plan2API
Continue talks to Plan2API through its built-in openai provider with a custom apiBase in config.yaml, so you don't need to install an extra plugin. That setup covers ChatGPT, Gemini, Kimi, and Claude Pro or Max subscription API access with these fields on each model entry:
| Key | Value |
|---|---|
| provider | openai |
| apiBase | https:// |
| apiKey | ${{ secrets.PLAN2API_ |
| model | A Plan2API id, such as claude/ |
| roles | chat, edit, apply |
| capabilities | tool_ |
| useResponsesApi | false on openai/ |
| autocomplete, embed | Assign to a different provider |
Set up Continue with Plan2API
- Sign up with a Google account, connect your subscription, and copy your
p2a_API key. - Open
~/.continue/.envand add the linePLAN2API_KEY=p2a_...with your key. - Open
~/.continue/config.yamlon macOS and Linux, or%USERPROFILE%\.continue\config.yamlon Windows. - Paste the model entries from the example below into your
modelslist. - Save
config.yaml, then pick the model from the model dropdown in the Continue panel.
Every entry repeats provider, apiBase and apiKey; the name, the model id, capabilities, the token limits under defaultCompletionOptions and flags such as useResponsesApi change per model. The example config.yaml below defines entries for Claude Sonnet 5, GPT-6.1 Sol, and Gemini 3.8 Flash.
name: Plan2API
version: 0.0.1
schema: v1
models:
- name: Claude Sonnet 5
provider: openai
model: claude/claude-sonnet-5
apiBase: https://api.plan2api.com/v1
apiKey: ${{ secrets.PLAN2API_KEY }}
roles:
- chat
- edit
- apply
capabilities:
- tool_use
- image_input
defaultCompletionOptions:
contextLength: 1000000
maxTokens: 32000
- name: GPT-6.1 Sol
provider: openai
model: openai/gpt-6.1-sol
apiBase: https://api.plan2api.com/v1
apiKey: ${{ secrets.PLAN2API_KEY }}
useResponsesApi: false
roles:
- chat
- edit
- apply
capabilities:
- tool_use
- name: Gemini 3.8 Flash
provider: openai
model: gemini/gemini-3.8-flash-high
apiBase: https://api.plan2api.com/v1
apiKey: ${{ secrets.PLAN2API_KEY }}
roles:
- chat
- edit
- apply
capabilities:
- tool_use
- image_input
defaultCompletionOptions:
contextLength: 1048576Pick Plan2API model ids for Continue
Instead of writing out each model by hand, you can set model: AUTODETECT on a provider: openai entry. When Continue loads config.yaml, it calls GET /v1/models and adds every returned model id using the roles, capabilities, and useResponsesApi setting from that entry. On entries you write by hand, defaultCompletionOptions.contextLength sets the context window in tokens (1000000 for Claude Sonnet 5, 1048576 for Gemini 3.8 Flash) and maxTokens caps the length of each reply.
If you list models individually, the prefix in the model id picks the provider, such as claude/ for Claude Sonnet 5 or gemini/ for Gemini 3.8 Flash. Calling GET /v1/models with your key lists every id Plan2API serves (models from providers you haven't connected return HTTP 403 no_credentials), and the table below covers the main options:
| model | Subscription | Note |
|---|---|---|
| claude/ | Claude Pro or Max | 1M context, up to 128K output |
| claude/ | Claude Pro or Max | 1M context, up to 128K output |
| openai/ | ChatGPT (Codex) | Add useResponsesApi: false |
| gemini/ | Google AI Pro or Ultra | 1,048,576-token context |
| kimi/ | Kimi Code | 1,048,576-token context |
Why GPT models need useResponsesApi: false
When a model entry uses provider: openai, Continue checks the model id and routes anything starting with o plus a digit, or containing gpt-5 through gpt-9 like openai/gpt-6.1-sol, to /responses instead of /chat/completions, no matter what apiBase is set to. Plan2API only serves /v1/chat/completions and has no /v1/responses endpoint, so those requests fail.
Adding useResponsesApi: false to the model entry forces Continue to send those requests to /chat/completions. Model ids for Claude, Gemini, and Kimi don't match that naming pattern and aren't affected, though leaving the flag on an AUTODETECT entry keeps detected GPT models working too.
The useResponsesApi option shipped in Continue's March 26, 2026 releases (VS Code 1.2.19 and JetBrains 1.0.64), so update your Continue extension if you're on an older build that ignores it.
Add useResponsesApi: false to any openai/ or codex/ GPT model entry in config.yaml so Continue calls /chat/completions instead of /responses.
What works in Continue and what doesn't
These Continue features work over POST /v1/chat/completions:
- Chat, Plan, and Agent mode with tool and function calls work when
tool_useis listed undercapabilities. - Edit mode (
edit) and Apply (apply) work for inline changes and writing code into files. - Streaming responses work across Claude, Codex, Gemini, and Kimi models.
- Image attachments work with
image_inputincapabilitieson Claude, Gemini, and Kimi models, plus Codex models that accept images. temperatureandtopPsettings are passed through on Gemini, fixed on Kimi (temperature1,top_p0.95), and ignored on Claude and Codex models.
These Continue features need endpoints that aren't served here, so assign them to a different provider in config.yaml:
- Tab
autocompletedoesn't work because Continue'sopenaiprovider reports no fill-in-the-middle (FIM) support, so autocomplete sends raw prompts to the legacy/v1/completionsendpoint, which Plan2API doesn't have. - The
embedrole doesn't work through Plan2API because there is no/v1/embeddingsendpoint, though the VS Code extension's built-inall-MiniLM-L6-v2embeddings model still indexes your codebase locally while JetBrains needs a separate embeddings provider. - The
rerankrole doesn't work either, because Plan2API has no rerank endpoint.
Troubleshooting Continue with Plan2API
401invalid_api_key:PLAN2API_KEYis missing from~/.continue/.env, the key is wrong, or it wasn't sent in theAuthorization: Bearerheader; check the.envfile and make sureapiKey: ${{ secrets.PLAN2API_KEY }}is set on the entry.403no_credentials: your vault has no connected subscription for that model's provider prefix, so connect an account for that provider in the dashboard.400model_not_found: themodelfield doesn't match a valid id; callGET /v1/modelsand copy a full prefixed id such asclaude/claude-sonnet-5orkimi/k3.- GPT requests failing on
/responses: Continue is routing agpt-5throughgpt-9oro-series id away from/chat/completions, so adduseResponsesApi: falseto that model entry and make sure your Continue extension is from March 26, 2026 or newer. 400unsupported_parameter: the request sent a non-textresponse_format(json_objectorjson_schema) to a Claude model, which only works on Codex, Gemini, and Kimi models.429daily_requests: you hit the Free plan limit of 50 chat requests a day (which resets at 00:00 UTC), and Agent mode reaches this faster since Continue sends a new chat request after every tool result, so check the Plan2API Pro and Scale plan limits and pricing if you want no daily request cap.
If Agent mode answers in plain text and never calls tools, add tool_use under capabilities on that model entry in config.yaml.
Use the AI subscriptions you already pay for as one OpenAI-compatible API key.
- Free: 1 subscription, 50 requests a day, no card
- Pro: $12 a month
FAQ
Which provider do I use for Plan2API in Continue?
Use provider: openai with apiBase set to https://api.plan2api.com/v1. You don't need a separate plugin.
Can I use my Claude Pro or Max subscription in Continue?
Yes, connect your Claude account in Plan2API and configure your Continue entry with provider: openai and a claude/ model id like claude/claude-sonnet-5.
Does Continue tab autocomplete work with Plan2API?
No, tab autocomplete needs fill-in-the-middle (FIM) support or the /v1/completions endpoint, which Plan2API doesn't serve. Assign the autocomplete role to another model in config.yaml.
Why does Continue call /responses for GPT models?
With provider: openai, Continue routes model ids that contain gpt-5 through gpt-9 or start with o plus a digit to /responses instead of /chat/completions. Set useResponsesApi: false on that model entry to force /chat/completions.
Can Continue load every Plan2API model automatically?
Yes, setting model: AUTODETECT on a provider: openai entry makes Continue call GET /v1/models on startup and add each returned id with that entry's settings. Keep useResponsesApi: false on the entry so detected GPT models use /chat/completions.
Does codebase indexing work with Plan2API?
Not through Plan2API, because it doesn't have a /v1/embeddings endpoint. In VS Code, Continue's built-in local embeddings model (all-MiniLM-L6-v2) still indexes your codebase, while in JetBrains you need to configure another embeddings provider.
Sources
- Continue config.yaml referencedocs.continue.dev
- Continue OpenAI provider docsdocs.continue.dev
- Continue model capabilitiesdocs.continue.dev
- Continue YAML model loader (GitHub)github.com
- Continue Responses API routing (GitHub)github.com
- Continue OpenAI provider source (GitHub)github.com
- Continue PR adding useResponsesApi (GitHub)github.com
- Continue embeddings model role docsdocs.continue.dev