continue-custom/packages/openai-adapters
Nate c21843805e Merge upstream continuedev/continue main into continue-fork
Resolve conflicts preserving the fork's removals (Hub/Mission Control/
control-plane/continue-proxy/MDM) while integrating upstream changes:
- core/llm/toolSupport.ts(.test.ts): drop reintroduced continue-proxy entry
- core/config/ConfigHandler.ts: keep upstream 'configs' file type + Promise.all,
  use fork's LocalProfileLoader signature (no controlPlaneClient)
- core/core.ts: keep upstream models/fetch handler; drop mdm/setLicenseKey
  handler (control-plane/mdm was removed by the fork)
- core/package-lock.json, binary/package-lock.json: regenerated via npm install

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-06 16:33:24 -07:00
..
src Merge upstream continuedev/continue main into continue-fork 2026-06-06 16:33:24 -07:00
.npmignore OpenAI Adapters (#1859) 2024-07-28 18:22:37 -07:00
jest.config.mjs clean up openai adapters tests 2025-02-15 19:26:31 -08:00
package-lock.json update depreciation banner 2026-03-26 15:42:33 -07:00
package.json fix: resolve critical and high security vulnerabilities (#11848) 2026-03-26 10:46:44 -07:00
README.md fix: openai adapters api support readme 2025-11-25 22:45:35 -08:00
release.config.js release automation for openai-adapters, llm-info, and fetch 2025-06-22 00:58:55 -07:00
tsconfig.json feat: use correct deployment for azure 2025-06-06 12:08:13 -07:00
vitest.config.ts fix: spread configDefaults.exclude in vitest config 2026-02-24 18:40:56 -08:00

OpenAI Adapters

OpenAI adapters convert an OpenAI-compatible request to a request for another API and back.

They are purely a translation layer, and are not concerned with:

  • Templates
  • Whether a model supports tools, images, etc.
  • Dynamically changing API base for model
  • Keeping track of system message (it will always be the first message with a systemMesage)
  • Keeping a private variable with anything that is already passed through the OpenAI request body
  • Appending "/" to the apiBase (but this is TODO)
  • Batching embeddings (yes, it requires some knowledge of max batch size, but it's more important to maintain 1 req = 1 req)
  • Using streamChat for streamComplete and vice-versa if one isn't defined

The goal is for this to change as infrequently as possible. It should only require updating when the actual API format changes.

They are concerned with:

  • Converting model aliases
  • Cache behavior
  • max stop words
  • use legacy completions endpoint?
  • anything else that couldn't possibly be guess by the client since it won't know the endpoint behind the proxy

Supported APIs

  • Anthropic
  • AskSage
  • Azure
  • Bedrock
  • Bedrock Import
  • Cerebras
  • Cloudflare
  • Cohere
  • DeepInfra
  • Deepseek
  • Flowise
  • Function Network
  • Gemini
  • Groq
  • HuggingFace Inference API
  • HuggingFace TGI
  • Kindo
  • LMStudio
  • LlamaCpp
  • Llamafile
  • Msty
  • Mistral
  • Nvidia
  • Nebius
  • OpenRouter
  • OpenAI
  • !Ollama
  • OVHCLoud
  • Replicate
  • SageMaker
  • SambaNova
  • Scaleway
  • Silicon Flow
  • TextGen Web UI
  • Together
  • Novita AI
  • Vllm
  • Vertex AI
  • Voyage AI
  • WatsonX
  • xAI
  • Fireworks
  • Moonshot