Skip to content

Commit e6a8361

Browse files
committed
Change api for custom providers to support openai-responses
1 parent 46217a2 commit e6a8361

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
- Change api for custom providers to support `openai-responses` instead of just `openai`, still supporting `openai` only.
6+
57
## 0.27.0
68

79
- Add support for auto read `AGENT.md` from workspace root and global eca dir, considering as context for chat prompts.

docs/models.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Example:
109109
{
110110
"customProviders": {
111111
"my-company": {
112-
"api": "openai",
112+
"api": "openai-responses",
113113
"urlEnv": "MY_COMPANY_API_URL", // or "url"
114114
"keyEnv": "MY_COMPANY_API_KEY", // or "key"
115115
"models": ["gpt-5", "deepseek-r1"],
@@ -123,7 +123,7 @@ Example:
123123

124124
| Option | Type | Description | Required |
125125
|--------|------|-------------|----------|
126-
| `api` | string | The API schema to use (`"openai"` or `"anthropic"`) | Yes |
126+
| `api` | string | The API schema to use (`"openai-responses"` or `"anthropic"`) | Yes |
127127
| `urlEnv` | string | Environment variable name containing the API URL | Yes* |
128128
| `url` | string | Direct API URL (use instead of `urlEnv`) | Yes* |
129129
| `keyEnv` | string | Environment variable name containing the API key | Yes* |
@@ -140,7 +140,7 @@ _* Either the `url` or `urlEnv` option is required, and either the `key` or `key
140140
{
141141
"customProviders": {
142142
"litellm": {
143-
"api": "openai",
143+
"api": "openai-responses",
144144
"url": "https://litellm.my-company.com",
145145
"key": "your-api-key",
146146
"models": ["gpt-5", "claude-3-sonnet-20240229", "llama-3-70b"],

src/eca/llm_api.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@
179179
(let [[provider model] (string/split model #"/" 2)
180180
provider-config (get custom-providers (keyword provider))
181181
provider-fn (case (:api provider-config)
182-
"openai" llm-providers.openai/completion!
182+
("openai-responses"
183+
"openai") llm-providers.openai/completion!
183184
"anthropic" llm-providers.anthropic/completion!
184185
(on-error-wrapper {:message (format "Unknown custom model %s for provider %s" (:api provider-config) provider)}))
185186
url (or (:url provider-config) (config/get-env (:urlEnv provider-config)))

0 commit comments

Comments
 (0)