Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

- Use a JSON-RPC `ping` (instead of `initialize`) for the OAuth auth-discovery probe, so the probe POST is never counted as a real handshake by servers or tests that track requests by method name.
- Add AWS Bedrock provider using the native `Converse`/`ConverseStream` APIs with bearer-token auth, supporting models not available on Bedrock's OpenAI-compatible endpoint (e.g. Claude inference profiles). #254

## 0.134.1

Expand Down
3 changes: 2 additions & 1 deletion docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,8 @@
"enum": [
"openai-responses",
"openai-chat",
"anthropic"
"anthropic",
"bedrock"
]
},
"fetchModels": {
Expand Down
28 changes: 28 additions & 0 deletions docs/config/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,34 @@ ECA support lots of providers via its supported APIs (openai-chat, openai-respon
}
```

=== "AWS Bedrock"

Uses the native Bedrock `Converse`/`ConverseStream` APIs, so models that are not exposed on Bedrock's OpenAI-compatible endpoint (e.g. Claude inference profiles) are reachable.

Authentication uses a bearer token (`AWS_BEARER_TOKEN_BEDROCK`); the region is part of the runtime URL. `models` are Bedrock model ids or inference-profile ids.

1. Login via the chat command `/login`.
2. Type 'bedrock' and send it.
3. Specify your API key, runtime URL and at least one model.
4. Done, it should be saved to your global config.

or manually via config:

```javascript title="~/.config/eca/config.json"
{
"providers": {
"bedrock": {
"api": "bedrock",
"url": "https://bedrock-runtime.us-east-1.amazonaws.com",
"key": "${env:AWS_BEARER_TOKEN_BEDROCK}",
"models": {
"us.anthropic.claude-sonnet-4-5-20250929-v1:0": {}
}
}
}
}
```

=== "Mistral"

The property `max_completion_token` is set to `null`, because Mistral does not support it.
Expand Down
10 changes: 8 additions & 2 deletions src/eca/features/providers.clj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"github-copilot" "GitHub Copilot"
"google" "Google"
"azure" "Azure"
"bedrock" "AWS Bedrock"
"deepseek" "DeepSeek"
"litellm" "LiteLLM"
"lmstudio" "LM Studio"
Expand All @@ -35,6 +36,7 @@
"github-copilot" [{:key "device" :label "GitHub device flow"}]
"google" [{:key "api-key" :label "Enter API key"}]
"azure" [{:key "api-key" :label "Enter API key, URL & models"}]
"bedrock" [{:key "api-key" :label "Enter API key, URL & models"}]
"deepseek" [{:key "api-key" :label "Enter API key & models"}]
"litellm" [{:key "api-key" :label "Enter API key, URL & models"}]
"lmstudio" [{:key "api-key" :label "Enter models"}]
Expand All @@ -61,7 +63,10 @@
{:key "models" :label "Model names (comma-separated)" :type "text"}]
"azure" [{:key "api-key" :label "API Key" :type "secret"}
{:key "url" :label "API URL" :type "text"}
{:key "models" :label "Model names (comma-separated)" :type "text"}]})
{:key "models" :label "Model names (comma-separated)" :type "text"}]
"bedrock" [{:key "api-key" :label "API Key (AWS_BEARER_TOKEN_BEDROCK)" :type "secret"}
{:key "url" :label "Runtime URL (e.g. https://bedrock-runtime.us-east-1.amazonaws.com)" :type "text"}
{:key "models" :label "Model/inference-profile ids (comma-separated)" :type "text"}]})

(def ^:private provider-configs
{"deepseek" {:api "openai-chat" :url "https://api.deepseek.com"}
Expand All @@ -73,7 +78,8 @@
"moonshot" {:api "openai-chat" :url "https://api.kimi.com/coding/v1"}
"openrouter" {:api "openai-chat" :url "https://openrouter.ai/api/v1"}
"z-ai" {:api "anthropic" :url "https://api.z.ai/api/anthropic"}
"azure" {:api "openai-chat"}})
"azure" {:api "openai-chat"}
"bedrock" {:api "bedrock"}})

;; --- Auth resolution ---

Expand Down
3 changes: 3 additions & 0 deletions src/eca/llm_api.clj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[eca.features.prompt :as f.prompt]
[eca.llm-providers.anthropic :as llm-providers.anthropic]
[eca.llm-providers.azure]
[eca.llm-providers.bedrock :as llm-providers.bedrock]
[eca.llm-providers.copilot]
[eca.llm-providers.deepseek]
[eca.llm-providers.errors :as llm-providers.errors]
Expand Down Expand Up @@ -143,6 +144,8 @@
:handler llm-providers.anthropic/chat!}
"openai-chat" {:api :openai-chat
:handler llm-providers.openai-chat/chat-completion!}
"bedrock" {:api :bedrock
:handler llm-providers.bedrock/chat!}
nil)))

(def ^:private reasoning-keys-by-api
Expand Down
Loading
Loading