Compare commits

...

4 Commits

Author SHA1 Message Date
simosmik
b0d8ea402c fix: base url config 2026-04-21 16:23:49 +00:00
Simos Mikelatos
2611a2744c Merge branch 'main' into feature/upgrade-claude-agent-sdk 2026-04-21 16:56:08 +02:00
simosmik
a20f6b8af4 feat: add "claude" as fallback in the cli path 2026-04-21 14:54:33 +00:00
simosmik
be08149e4a feat: introduce opus 4.7
- Bump claude-agent-sdk from 0.2.59 to 0.2.116
- Forward process.env to SDK subprocess so ANTHROPIC_BASE_URL and other env vars work
- Add claude-opus-4-6 as a distinct mode
2026-04-21 14:16:15 +00:00
5 changed files with 717 additions and 331 deletions

1024
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -65,7 +65,7 @@
"author": "CloudCLI UI Contributors",
"license": "AGPL-3.0-or-later",
"dependencies": {
"@anthropic-ai/claude-agent-sdk": "^0.2.59",
"@anthropic-ai/claude-agent-sdk": "^0.2.116",
"@codemirror/lang-css": "^6.3.1",
"@codemirror/lang-html": "^6.4.9",
"@codemirror/lang-javascript": "^6.2.4",

View File

@@ -149,9 +149,15 @@ function mapCliOptionsToSDK(options = {}) {
const sdkOptions = {};
if (process.env.CLAUDE_CLI_PATH) {
sdkOptions.pathToClaudeCodeExecutable = process.env.CLAUDE_CLI_PATH;
}
// Forward all host env vars (e.g. ANTHROPIC_BASE_URL) to the subprocess.
// Since SDK 0.2.113, options.env replaces process.env instead of overlaying it.
sdkOptions.env = { ...process.env };
// Use CLAUDE_CLI_PATH if explicitly set, otherwise fall back to 'claude' on PATH.
// The SDK 0.2.113+ looks for a bundled native binary optional dep by default;
// this fallback ensures users who installed via the official installer still work
// even when npm prune --production has removed those optional deps.
sdkOptions.pathToClaudeCodeExecutable = process.env.CLAUDE_CLI_PATH || 'claude';
// Map working directory
if (cwd) {

View File

@@ -4,10 +4,13 @@
"module": "NodeNext",
"moduleResolution": "NodeNext",
"lib": ["ES2022"],
"baseUrl": ".",
// baseUrl is the project root (one level above this config file) so that tsc-alias
// resolves @/ imports relative to the compiled output structure in dist-server/server/.
// With rootDir ".." tsc emits server files under dist-server/server/, so paths must
// include the "server/" prefix to match that layout.
"baseUrl": "..",
"paths": {
// In the backend config, "@" maps to the /server directory itself.
"@/*": ["*"]
"@/*": ["server/*"]
},
// The backend is still mostly JavaScript today, so allowJs lets us add a real
// TypeScript build without forcing a large rename before the tooling is usable.

View File

@@ -16,6 +16,7 @@ export const CLAUDE_MODELS = {
{ value: "sonnet", label: "Sonnet" },
{ value: "opus", label: "Opus" },
{ value: "haiku", label: "Haiku" },
{ value: "claude-opus-4-6", label: "Opus 4.6" },
{ value: "opusplan", label: "Opus Plan" },
{ value: "sonnet[1m]", label: "Sonnet [1M]" },
{ value: "opus[1m]", label: "Opus [1M]" },