|
17 | 17 | [clojure.string :as string] |
18 | 18 | [clojure.walk :as walk] |
19 | 19 | [eca.features.agents :as agents] |
20 | | - [rewrite-json.core :as rj] |
21 | 20 | [eca.interpolation :as interpolation] |
22 | 21 | [eca.logger :as logger] |
23 | 22 | [eca.messenger :as messenger] |
24 | | - [eca.shared :as shared :refer [multi-str]]) |
| 23 | + [eca.shared :as shared :refer [multi-str]] |
| 24 | + [rewrite-json.core :as rj]) |
25 | 25 | (:import |
26 | 26 | [java.io File])) |
27 | 27 |
|
|
64 | 64 | "high" {:output_config {:effort "high"} :thinking {:type "adaptive"}} |
65 | 65 | "max" {:output_config {:effort "max"} :thinking {:type "adaptive"}}}) |
66 | 66 |
|
| 67 | +(def ^:private anthropic-v2-variants |
| 68 | + {"default" {:thinking {:type "adaptive" :display "summarized"}} |
| 69 | + "low" {:output_config {:effort "low"} :thinking {:type "adaptive" :display "summarized"}} |
| 70 | + "medium" {:output_config {:effort "medium"} :thinking {:type "adaptive" :display "summarized"}} |
| 71 | + "high" {:output_config {:effort "high"} :thinking {:type "adaptive" :display "summarized"}} |
| 72 | + "xhigh" {:output_config {:effort "xhigh"} :thinking {:type "adaptive" :display "summarized"}} |
| 73 | + "max" {:output_config {:effort "max"} :thinking {:type "adaptive" :display "summarized"}}}) |
| 74 | + |
67 | 75 | (def ^:private initial-config* |
68 | 76 | {:providers {"openai" {:api "openai-responses" |
69 | 77 | :url "${env:OPENAI_API_URL:https://api.openai.com}" |
|
79 | 87 | :key "${env:ANTHROPIC_API_KEY}" |
80 | 88 | :requiresAuth? true |
81 | 89 | :models {"claude-sonnet-4-6" {} |
82 | | - "claude-opus-4-6" {}}} |
| 90 | + "claude-opus-4-6" {} |
| 91 | + "claude-opus-4-7" {}}} |
83 | 92 | "github-copilot" {:api "openai-chat" |
84 | 93 | :url "${env:GITHUB_COPILOT_API_URL:https://api.githubcopilot.com}" |
85 | 94 | :key nil ;; not supported, requires login auth |
|
172 | 181 | :shellCommand {:summaryMaxLength 35} |
173 | 182 | :outputTruncation {:lines 2000 :sizeKb 50}} |
174 | 183 | :variantsByModel {".*sonnet[-._]4[-._]6|opus[-._]4[-._][56]" {:variants anthropic-variants} |
| 184 | + ".*opus[-._]4[-._]7" {:variants anthropic-v2-variants} |
175 | 185 | ".*gpt[-._]5(?:[-._](?:2|4)(?!\\d)|[-._]3[-._]codex)" {:variants openai-variants |
176 | 186 | :excludeProviders ["github-copilot"]}} |
177 | 187 | :mcpTimeoutSeconds 60 |
|
243 | 253 | (when (seq filtered) |
244 | 254 | filtered))))) |
245 | 255 |
|
| 256 | +(defn selectable-variant-names |
| 257 | + "Returns sorted variant names suitable for UI display, excluding internal-only |
| 258 | + variants like \"default\" which are applied automatically." |
| 259 | + [variants] |
| 260 | + (when (seq variants) |
| 261 | + (vec (sort (remove #{"default"} (keys variants)))))) |
| 262 | + |
246 | 263 | (def ^:private fallback-agent "code") |
247 | 264 |
|
248 | 265 | (defn primary-agent-names |
|
0 commit comments