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:

Continue config.yaml values for Plan2API
KeyValue
provideropenai
apiBasehttps://api.plan2api.com/v1
apiKey${{ secrets.PLAN2API_KEY }}
modelA Plan2API id, such as claude/claude-sonnet-5
roleschat, edit, apply
capabilitiestool_use, plus image_input for images
useResponsesApifalse on openai/gpt-* ids
autocomplete, embedAssign to a different provider

Set up Continue with Plan2API

  1. Sign up with a Google account, connect your subscription, and copy your p2a_ API key.
  2. Open ~/.continue/.env and add the line PLAN2API_KEY=p2a_... with your key.
  3. Open ~/.continue/config.yaml on macOS and Linux, or %USERPROFILE%\.continue\config.yaml on Windows.
  4. Paste the model entries from the example below into your models list.
  5. 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.

YAML
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: 1048576

Pick 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:

Plan2API model ids for Continue
modelSubscriptionNote
claude/claude-sonnet-5Claude Pro or Max1M context, up to 128K output
claude/claude-opus-5-5Claude Pro or Max1M context, up to 128K output
openai/gpt-6.1-solChatGPT (Codex)Add useResponsesApi: false
gemini/gemini-3.8-flash-highGoogle AI Pro or Ultra1,048,576-token context
kimi/k3Kimi Code1,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_use is listed under capabilities.
  • 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_input in capabilities on Claude, Gemini, and Kimi models, plus Codex models that accept images.
  • temperature and topP settings are passed through on Gemini, fixed on Kimi (temperature 1, top_p 0.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 autocomplete doesn't work because Continue's openai provider reports no fill-in-the-middle (FIM) support, so autocomplete sends raw prompts to the legacy /v1/completions endpoint, which Plan2API doesn't have.
  • The embed role doesn't work through Plan2API because there is no /v1/embeddings endpoint, though the VS Code extension's built-in all-MiniLM-L6-v2 embeddings model still indexes your codebase locally while JetBrains needs a separate embeddings provider.
  • The rerank role doesn't work either, because Plan2API has no rerank endpoint.

Troubleshooting Continue with Plan2API

  • 401 invalid_api_key: PLAN2API_KEY is missing from ~/.continue/.env, the key is wrong, or it wasn't sent in the Authorization: Bearer header; check the .env file and make sure apiKey: ${{ secrets.PLAN2API_KEY }} is set on the entry.
  • 403 no_credentials: your vault has no connected subscription for that model's provider prefix, so connect an account for that provider in the dashboard.
  • 400 model_not_found: the model field doesn't match a valid id; call GET /v1/models and copy a full prefixed id such as claude/claude-sonnet-5 or kimi/k3.
  • GPT requests failing on /responses: Continue is routing a gpt-5 through gpt-9 or o-series id away from /chat/completions, so add useResponsesApi: false to that model entry and make sure your Continue extension is from March 26, 2026 or newer.
  • 400 unsupported_parameter: the request sent a non-text response_format (json_object or json_schema) to a Claude model, which only works on Codex, Gemini, and Kimi models.
  • 429 daily_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

  1. Continue config.yaml referencedocs.continue.dev
  2. Continue OpenAI provider docsdocs.continue.dev
  3. Continue model capabilitiesdocs.continue.dev
  4. Continue YAML model loader (GitHub)github.com
  5. Continue Responses API routing (GitHub)github.com
  6. Continue OpenAI provider source (GitHub)github.com
  7. Continue PR adding useResponsesApi (GitHub)github.com
  8. Continue embeddings model role docsdocs.continue.dev