Elffuss BraidHub

kikocis/continue public

main · 1.7 KiBRenderedRawPermalink
1# OpenAI Adapters
2
3OpenAI adapters convert an OpenAI-compatible request to a request for another API and back.
4
5They are purely a translation layer, and are not concerned with:
6
7- Templates
8- Whether a model supports tools, images, etc.
9- Dynamically changing API base for model
10- Keeping track of system message (it will always be the first message with a systemMesage)
11- Keeping a private variable with anything that is already passed through the OpenAI request body
12- Appending "/" to the apiBase (but this is TODO)
13- Batching embeddings (yes, it requires some knowledge of max batch size, but it's more important to maintain 1 req = 1 req)
14- Using streamChat for streamComplete and vice-versa if one isn't defined
15
16The goal is for this to change as infrequently as possible. It should only require updating when the actual API format changes.
17
18They are concerned with:
19
20- Converting model aliases
21- Cache behavior
22- max stop words
23- use legacy completions endpoint?
24- anything else that couldn't possibly be guess by the client since it won't know the endpoint behind the proxy
25
26## Supported APIs
27
28- [x] Anthropic
29- [ ] AskSage
30- [x] Azure
31- [ ] Bedrock
32- [ ] Bedrock Import
33- [x] Cerebras
34- [ ] Cloudflare
35- [x] Cohere
36- [x] DeepInfra
37- [x] Deepseek
38- [ ] Flowise
39- [x] Function Network
40- [x] Gemini
41- [x] Groq
42- [ ] HuggingFace Inference API
43- [ ] HuggingFace TGI
44- [x] Kindo
45- [x] LMStudio
46- [x] LlamaCpp
47- [x] Llamafile
48- [x] Msty
49- [x] Mistral
50- [x] Nvidia
51- [x] Nebius
52- [x] OpenRouter
53- [x] OpenAI
54- [ ] !Ollama
55- [x] OVHCLoud
56- [ ] Replicate
57- [ ] SageMaker
58- [x] SambaNova
59- [x] Scaleway
60- [ ] Silicon Flow
61- [x] TextGen Web UI
62- [x] Together
63- [x] Novita AI
64- [x] Vllm
65- [ ] Vertex AI
66- [x] Voyage AI
67- [x] WatsonX
68- [x] xAI
69- [x] Fireworks
70- [x] Moonshot