Commit 34cdd80
feat: OpenAI-compatible model support (GPT, DeepSeek, Ollama, OpenRouter, etc.)
SDK v0.4.1 adds full OpenAI Chat Completions API adapter:
- Auto-detection from BaseURL, API key prefix, model name
- Supports: OpenAI, OpenRouter, DeepSeek, Ollama, Together, Groq, vLLM, LMStudio
- Full tool calling support (function calling format)
- Streaming and non-streaming modes
- Request/response format conversion (Anthropic ↔ OpenAI)
Config:
- "provider" field in settings.json ("anthropic" or "openai", auto if empty)
- Works with existing CODEANY_BASE_URL + CODEANY_API_KEY env vars
Example configs:
# OpenAI
{"provider": "openai", "baseURL": "https://api.openai.com/v1", "model": "gpt-4o"}
# Ollama (local)
{"baseURL": "http://localhost:11434/v1", "model": "llama3.2"}
# DeepSeek
{"baseURL": "https://api.deepseek.com/v1", "model": "deepseek-chat"}
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent b1cd6c5 commit 34cdd80
5 files changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
| 35 | + | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
207 | 208 | | |
208 | 209 | | |
209 | 210 | | |
| |||
0 commit comments