mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
chore(release): sync Sonnet 5 stable release to main
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.1.103 - 2026-07-01
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Claude Sonnet 5 is available in the Claude model picker ([#1850](https://github.com/getpaseo/paseo/pull/1850))
|
||||||
|
|
||||||
## 0.1.102 - 2026-06-30
|
## 0.1.102 - 2026-06-30
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
42
package-lock.json
generated
42
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "paseo",
|
"name": "paseo",
|
||||||
"version": "0.1.102",
|
"version": "0.1.103",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "paseo",
|
"name": "paseo",
|
||||||
"version": "0.1.102",
|
"version": "0.1.103",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
@@ -35132,7 +35132,7 @@
|
|||||||
},
|
},
|
||||||
"packages/app": {
|
"packages/app": {
|
||||||
"name": "@getpaseo/app",
|
"name": "@getpaseo/app",
|
||||||
"version": "0.1.102",
|
"version": "0.1.103",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dnd-kit/core": "^6.3.1",
|
"@dnd-kit/core": "^6.3.1",
|
||||||
"@dnd-kit/sortable": "^10.0.0",
|
"@dnd-kit/sortable": "^10.0.0",
|
||||||
@@ -36150,12 +36150,12 @@
|
|||||||
},
|
},
|
||||||
"packages/cli": {
|
"packages/cli": {
|
||||||
"name": "@getpaseo/cli",
|
"name": "@getpaseo/cli",
|
||||||
"version": "0.1.102",
|
"version": "0.1.103",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@clack/prompts": "^1.0.0",
|
"@clack/prompts": "^1.0.0",
|
||||||
"@getpaseo/client": "0.1.102",
|
"@getpaseo/client": "0.1.103",
|
||||||
"@getpaseo/protocol": "0.1.102",
|
"@getpaseo/protocol": "0.1.103",
|
||||||
"@getpaseo/server": "0.1.102",
|
"@getpaseo/server": "0.1.103",
|
||||||
"chalk": "^5.3.0",
|
"chalk": "^5.3.0",
|
||||||
"commander": "^12.0.0",
|
"commander": "^12.0.0",
|
||||||
"mime-types": "^2.1.35",
|
"mime-types": "^2.1.35",
|
||||||
@@ -36401,10 +36401,10 @@
|
|||||||
},
|
},
|
||||||
"packages/client": {
|
"packages/client": {
|
||||||
"name": "@getpaseo/client",
|
"name": "@getpaseo/client",
|
||||||
"version": "0.1.102",
|
"version": "0.1.103",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@getpaseo/protocol": "0.1.102",
|
"@getpaseo/protocol": "0.1.103",
|
||||||
"@getpaseo/relay": "0.1.102",
|
"@getpaseo/relay": "0.1.103",
|
||||||
"zod": "^4.4.3"
|
"zod": "^4.4.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -36415,7 +36415,7 @@
|
|||||||
},
|
},
|
||||||
"packages/desktop": {
|
"packages/desktop": {
|
||||||
"name": "@getpaseo/desktop",
|
"name": "@getpaseo/desktop",
|
||||||
"version": "0.1.102",
|
"version": "0.1.103",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@getpaseo/cli": "*",
|
"@getpaseo/cli": "*",
|
||||||
@@ -36658,7 +36658,7 @@
|
|||||||
},
|
},
|
||||||
"packages/expo-two-way-audio": {
|
"packages/expo-two-way-audio": {
|
||||||
"name": "@getpaseo/expo-two-way-audio",
|
"name": "@getpaseo/expo-two-way-audio",
|
||||||
"version": "0.1.102",
|
"version": "0.1.103",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^29.5.14",
|
"@types/jest": "^29.5.14",
|
||||||
@@ -37554,7 +37554,7 @@
|
|||||||
},
|
},
|
||||||
"packages/highlight": {
|
"packages/highlight": {
|
||||||
"name": "@getpaseo/highlight",
|
"name": "@getpaseo/highlight",
|
||||||
"version": "0.1.102",
|
"version": "0.1.103",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codemirror/language": "^6.12.3",
|
"@codemirror/language": "^6.12.3",
|
||||||
"@codemirror/legacy-modes": "^6.5.3",
|
"@codemirror/legacy-modes": "^6.5.3",
|
||||||
@@ -37786,7 +37786,7 @@
|
|||||||
},
|
},
|
||||||
"packages/protocol": {
|
"packages/protocol": {
|
||||||
"name": "@getpaseo/protocol",
|
"name": "@getpaseo/protocol",
|
||||||
"version": "0.1.102",
|
"version": "0.1.103",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"zod": "^4.4.3"
|
"zod": "^4.4.3"
|
||||||
},
|
},
|
||||||
@@ -37798,7 +37798,7 @@
|
|||||||
},
|
},
|
||||||
"packages/relay": {
|
"packages/relay": {
|
||||||
"name": "@getpaseo/relay",
|
"name": "@getpaseo/relay",
|
||||||
"version": "0.1.102",
|
"version": "0.1.103",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"base64-js": "^1.5.1",
|
"base64-js": "^1.5.1",
|
||||||
"tweetnacl": "^1.0.3",
|
"tweetnacl": "^1.0.3",
|
||||||
@@ -38016,15 +38016,15 @@
|
|||||||
},
|
},
|
||||||
"packages/server": {
|
"packages/server": {
|
||||||
"name": "@getpaseo/server",
|
"name": "@getpaseo/server",
|
||||||
"version": "0.1.102",
|
"version": "0.1.103",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@agentclientprotocol/sdk": "^0.17.1",
|
"@agentclientprotocol/sdk": "^0.17.1",
|
||||||
"@anthropic-ai/claude-agent-sdk": "^0.3.195",
|
"@anthropic-ai/claude-agent-sdk": "^0.3.195",
|
||||||
"@anthropic-ai/sdk": "^0.104.2",
|
"@anthropic-ai/sdk": "^0.104.2",
|
||||||
"@getpaseo/client": "0.1.102",
|
"@getpaseo/client": "0.1.103",
|
||||||
"@getpaseo/highlight": "0.1.102",
|
"@getpaseo/highlight": "0.1.103",
|
||||||
"@getpaseo/protocol": "0.1.102",
|
"@getpaseo/protocol": "0.1.103",
|
||||||
"@getpaseo/relay": "0.1.102",
|
"@getpaseo/relay": "0.1.103",
|
||||||
"@isaacs/ttlcache": "^2.1.4",
|
"@isaacs/ttlcache": "^2.1.4",
|
||||||
"@modelcontextprotocol/sdk": "^1.20.1",
|
"@modelcontextprotocol/sdk": "^1.20.1",
|
||||||
"@opencode-ai/sdk": "1.14.46",
|
"@opencode-ai/sdk": "1.14.46",
|
||||||
@@ -38561,7 +38561,7 @@
|
|||||||
},
|
},
|
||||||
"packages/website": {
|
"packages/website": {
|
||||||
"name": "@getpaseo/website",
|
"name": "@getpaseo/website",
|
||||||
"version": "0.1.102",
|
"version": "0.1.103",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@cloudflare/vite-plugin": "^1.29.1",
|
"@cloudflare/vite-plugin": "^1.29.1",
|
||||||
"@cloudflare/workers-types": "^4.20260317.1",
|
"@cloudflare/workers-types": "^4.20260317.1",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "paseo",
|
"name": "paseo",
|
||||||
"version": "0.1.102",
|
"version": "0.1.103",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Paseo: voice-controlled development environment for local AI coding agents",
|
"description": "Paseo: voice-controlled development environment for local AI coding agents",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@getpaseo/app",
|
"name": "@getpaseo/app",
|
||||||
"version": "0.1.102",
|
"version": "0.1.103",
|
||||||
"private": true,
|
"private": true,
|
||||||
"main": "index.ts",
|
"main": "index.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@getpaseo/cli",
|
"name": "@getpaseo/cli",
|
||||||
"version": "0.1.102",
|
"version": "0.1.103",
|
||||||
"description": "Paseo CLI - control your AI coding agents from the command line",
|
"description": "Paseo CLI - control your AI coding agents from the command line",
|
||||||
"bin": {
|
"bin": {
|
||||||
"paseo": "bin/paseo"
|
"paseo": "bin/paseo"
|
||||||
@@ -27,9 +27,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@clack/prompts": "^1.0.0",
|
"@clack/prompts": "^1.0.0",
|
||||||
"@getpaseo/client": "0.1.102",
|
"@getpaseo/client": "0.1.103",
|
||||||
"@getpaseo/protocol": "0.1.102",
|
"@getpaseo/protocol": "0.1.103",
|
||||||
"@getpaseo/server": "0.1.102",
|
"@getpaseo/server": "0.1.103",
|
||||||
"chalk": "^5.3.0",
|
"chalk": "^5.3.0",
|
||||||
"commander": "^12.0.0",
|
"commander": "^12.0.0",
|
||||||
"mime-types": "^2.1.35",
|
"mime-types": "^2.1.35",
|
||||||
|
|||||||
@@ -60,6 +60,11 @@ const EXPECTED_CLAUDE_MODELS = [
|
|||||||
model: "Opus 4.8",
|
model: "Opus 4.8",
|
||||||
descriptionFragment: "Latest release",
|
descriptionFragment: "Latest release",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "claude-sonnet-5",
|
||||||
|
model: "Sonnet 5",
|
||||||
|
descriptionFragment: "Best for everyday tasks",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: "claude-opus-4-7[1m]",
|
id: "claude-opus-4-7[1m]",
|
||||||
model: "Opus 4.7 1M",
|
model: "Opus 4.7 1M",
|
||||||
@@ -392,7 +397,7 @@ try {
|
|||||||
"--quiet should print the current Claude catalog IDs",
|
"--quiet should print the current Claude catalog IDs",
|
||||||
);
|
);
|
||||||
assert(
|
assert(
|
||||||
claudeModelsFromJson.some((m) => m.id === "claude-sonnet-4-6"),
|
claudeModelsFromJson.some((m) => m.id === "claude-sonnet-5"),
|
||||||
"captured --json output should include the current Claude everyday model id",
|
"captured --json output should include the current Claude everyday model id",
|
||||||
);
|
);
|
||||||
console.log("✓ provider models --quiet outputs model IDs only\n");
|
console.log("✓ provider models --quiet outputs model IDs only\n");
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@getpaseo/client",
|
"name": "@getpaseo/client",
|
||||||
"version": "0.1.102",
|
"version": "0.1.103",
|
||||||
"description": "Paseo client SDK package",
|
"description": "Paseo client SDK package",
|
||||||
"files": [
|
"files": [
|
||||||
"dist",
|
"dist",
|
||||||
@@ -35,8 +35,8 @@
|
|||||||
"test": "vitest run"
|
"test": "vitest run"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@getpaseo/protocol": "0.1.102",
|
"@getpaseo/protocol": "0.1.103",
|
||||||
"@getpaseo/relay": "0.1.102",
|
"@getpaseo/relay": "0.1.103",
|
||||||
"zod": "^4.4.3"
|
"zod": "^4.4.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@getpaseo/desktop",
|
"name": "@getpaseo/desktop",
|
||||||
"version": "0.1.102",
|
"version": "0.1.103",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Paseo desktop app (Electron wrapper)",
|
"description": "Paseo desktop app (Electron wrapper)",
|
||||||
"homepage": "https://paseo.sh",
|
"homepage": "https://paseo.sh",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@getpaseo/expo-two-way-audio",
|
"name": "@getpaseo/expo-two-way-audio",
|
||||||
"version": "0.1.102",
|
"version": "0.1.103",
|
||||||
"description": "Native module for two way audio streaming",
|
"description": "Native module for two way audio streaming",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"ExpoTwoWayAudio",
|
"ExpoTwoWayAudio",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@getpaseo/highlight",
|
"name": "@getpaseo/highlight",
|
||||||
"version": "0.1.102",
|
"version": "0.1.103",
|
||||||
"files": [
|
"files": [
|
||||||
"dist",
|
"dist",
|
||||||
"!dist/**/*.map"
|
"!dist/**/*.map"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@getpaseo/protocol",
|
"name": "@getpaseo/protocol",
|
||||||
"version": "0.1.102",
|
"version": "0.1.103",
|
||||||
"description": "Paseo shared protocol schemas and wire types",
|
"description": "Paseo shared protocol schemas and wire types",
|
||||||
"files": [
|
"files": [
|
||||||
"dist",
|
"dist",
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ export interface AgentModelDefinition {
|
|||||||
description?: string;
|
description?: string;
|
||||||
isDefault?: boolean;
|
isDefault?: boolean;
|
||||||
metadata?: AgentMetadata;
|
metadata?: AgentMetadata;
|
||||||
|
contextWindowMaxTokens?: number;
|
||||||
thinkingOptions?: AgentSelectOption[];
|
thinkingOptions?: AgentSelectOption[];
|
||||||
defaultThinkingOptionId?: string;
|
defaultThinkingOptionId?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ describe("provider snapshot message schemas", () => {
|
|||||||
id: "MiniMax-M2.7",
|
id: "MiniMax-M2.7",
|
||||||
label: "MiniMax-M2.7",
|
label: "MiniMax-M2.7",
|
||||||
isDefault: true,
|
isDefault: true,
|
||||||
|
contextWindowMaxTokens: 1_000_000,
|
||||||
thinkingOptions: [
|
thinkingOptions: [
|
||||||
{ id: "off", label: "Off" },
|
{ id: "off", label: "Off" },
|
||||||
{ id: "max", label: "Max", isDefault: true },
|
{ id: "max", label: "Max", isDefault: true },
|
||||||
@@ -62,6 +63,7 @@ describe("provider snapshot message schemas", () => {
|
|||||||
id: "MiniMax-M2.7",
|
id: "MiniMax-M2.7",
|
||||||
label: "MiniMax-M2.7",
|
label: "MiniMax-M2.7",
|
||||||
isDefault: true,
|
isDefault: true,
|
||||||
|
contextWindowMaxTokens: 1_000_000,
|
||||||
thinkingOptions: [
|
thinkingOptions: [
|
||||||
{ id: "off", label: "Off" },
|
{ id: "off", label: "Off" },
|
||||||
{ id: "max", label: "Max", isDefault: true },
|
{ id: "max", label: "Max", isDefault: true },
|
||||||
|
|||||||
@@ -254,6 +254,7 @@ const AgentModelDefinitionSchema: z.ZodType<AgentModelDefinition> = z
|
|||||||
description: z.string().optional(),
|
description: z.string().optional(),
|
||||||
isDefault: z.boolean().optional(),
|
isDefault: z.boolean().optional(),
|
||||||
metadata: z.record(z.string(), z.unknown()).optional(),
|
metadata: z.record(z.string(), z.unknown()).optional(),
|
||||||
|
contextWindowMaxTokens: z.number().optional(),
|
||||||
thinkingOptions: z.array(AgentSelectOptionSchema).optional(),
|
thinkingOptions: z.array(AgentSelectOptionSchema).optional(),
|
||||||
defaultThinkingOptionId: z.string().optional(),
|
defaultThinkingOptionId: z.string().optional(),
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@getpaseo/relay",
|
"name": "@getpaseo/relay",
|
||||||
"version": "0.1.102",
|
"version": "0.1.103",
|
||||||
"description": "Paseo relay for bridging daemon and client connections",
|
"description": "Paseo relay for bridging daemon and client connections",
|
||||||
"files": [
|
"files": [
|
||||||
"dist",
|
"dist",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@getpaseo/server",
|
"name": "@getpaseo/server",
|
||||||
"version": "0.1.102",
|
"version": "0.1.103",
|
||||||
"description": "Paseo backend server",
|
"description": "Paseo backend server",
|
||||||
"files": [
|
"files": [
|
||||||
"dist/server",
|
"dist/server",
|
||||||
@@ -65,10 +65,10 @@
|
|||||||
"@agentclientprotocol/sdk": "^0.17.1",
|
"@agentclientprotocol/sdk": "^0.17.1",
|
||||||
"@anthropic-ai/claude-agent-sdk": "^0.3.195",
|
"@anthropic-ai/claude-agent-sdk": "^0.3.195",
|
||||||
"@anthropic-ai/sdk": "^0.104.2",
|
"@anthropic-ai/sdk": "^0.104.2",
|
||||||
"@getpaseo/client": "0.1.102",
|
"@getpaseo/client": "0.1.103",
|
||||||
"@getpaseo/highlight": "0.1.102",
|
"@getpaseo/highlight": "0.1.103",
|
||||||
"@getpaseo/protocol": "0.1.102",
|
"@getpaseo/protocol": "0.1.103",
|
||||||
"@getpaseo/relay": "0.1.102",
|
"@getpaseo/relay": "0.1.103",
|
||||||
"@isaacs/ttlcache": "^2.1.4",
|
"@isaacs/ttlcache": "^2.1.4",
|
||||||
"@modelcontextprotocol/sdk": "^1.20.1",
|
"@modelcontextprotocol/sdk": "^1.20.1",
|
||||||
"@opencode-ai/sdk": "1.14.46",
|
"@opencode-ai/sdk": "1.14.46",
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ export interface AgentModelDefinition {
|
|||||||
description?: string;
|
description?: string;
|
||||||
isDefault?: boolean;
|
isDefault?: boolean;
|
||||||
metadata?: AgentMetadata;
|
metadata?: AgentMetadata;
|
||||||
|
contextWindowMaxTokens?: number;
|
||||||
thinkingOptions?: AgentSelectOption[];
|
thinkingOptions?: AgentSelectOption[];
|
||||||
defaultThinkingOptionId?: string;
|
defaultThinkingOptionId?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -416,6 +416,7 @@ describe("ClaudeAgentClient.fetchCatalog", () => {
|
|||||||
"claude-fable-5",
|
"claude-fable-5",
|
||||||
"claude-opus-4-8[1m]",
|
"claude-opus-4-8[1m]",
|
||||||
"claude-opus-4-8",
|
"claude-opus-4-8",
|
||||||
|
"claude-sonnet-5",
|
||||||
"claude-opus-4-7[1m]",
|
"claude-opus-4-7[1m]",
|
||||||
"claude-opus-4-7",
|
"claude-opus-4-7",
|
||||||
"claude-opus-4-6[1m]",
|
"claude-opus-4-6[1m]",
|
||||||
@@ -457,6 +458,8 @@ describe("ClaudeAgentClient.fetchCatalog", () => {
|
|||||||
expect(getThinkingIds("claude-fable-5")).toContain("ultracode");
|
expect(getThinkingIds("claude-fable-5")).toContain("ultracode");
|
||||||
expect(getThinkingIds("claude-opus-4-8[1m]")).toContain("ultracode");
|
expect(getThinkingIds("claude-opus-4-8[1m]")).toContain("ultracode");
|
||||||
expect(getThinkingIds("claude-opus-4-8")).toContain("ultracode");
|
expect(getThinkingIds("claude-opus-4-8")).toContain("ultracode");
|
||||||
|
expect(getThinkingIds("claude-sonnet-5")).toContain("xhigh");
|
||||||
|
expect(getThinkingIds("claude-sonnet-5")).not.toContain("ultracode");
|
||||||
expect(getThinkingIds("claude-opus-4-7")).not.toContain("ultracode");
|
expect(getThinkingIds("claude-opus-4-7")).not.toContain("ultracode");
|
||||||
expect(getThinkingIds("claude-sonnet-4-6")).not.toContain("ultracode");
|
expect(getThinkingIds("claude-sonnet-4-6")).not.toContain("ultracode");
|
||||||
} finally {
|
} finally {
|
||||||
@@ -1889,6 +1892,30 @@ describe("ClaudeAgentSession context window usage", () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("native 1M Claude models seed active context window usage from the catalog", async () => {
|
||||||
|
const session = await createSessionForTurns(
|
||||||
|
[[createInitMessage(), createMessageStartEvent(), createSuccessResult()]],
|
||||||
|
{ model: "claude-sonnet-5" },
|
||||||
|
);
|
||||||
|
|
||||||
|
try {
|
||||||
|
const events = await collectStreamEvents(session);
|
||||||
|
|
||||||
|
expect(events).toContainEqual(
|
||||||
|
expect.objectContaining({
|
||||||
|
type: "usage_updated",
|
||||||
|
provider: "claude",
|
||||||
|
usage: {
|
||||||
|
contextWindowMaxTokens: 1_000_000,
|
||||||
|
contextWindowUsedTokens: 150,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
} finally {
|
||||||
|
await session.close();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
test("message_delta stream events update per-request usage", async () => {
|
test("message_delta stream events update per-request usage", async () => {
|
||||||
const session = await createSessionForTurns([
|
const session = await createSessionForTurns([
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -29,7 +29,11 @@ import {
|
|||||||
mapTaskNotificationSystemRecordToToolCall,
|
mapTaskNotificationSystemRecordToToolCall,
|
||||||
mapTaskNotificationUserContentToToolCall,
|
mapTaskNotificationUserContentToToolCall,
|
||||||
} from "./task-notification-tool-call.js";
|
} from "./task-notification-tool-call.js";
|
||||||
import { getClaudeModelsWithSettings, normalizeClaudeRuntimeModelId } from "./models.js";
|
import {
|
||||||
|
findClaudeModel,
|
||||||
|
getClaudeModelsWithSettings,
|
||||||
|
normalizeClaudeRuntimeModelId,
|
||||||
|
} from "./models.js";
|
||||||
import { parsePartialJsonObject } from "./partial-json.js";
|
import { parsePartialJsonObject } from "./partial-json.js";
|
||||||
import { ClaudeSidechainTracker } from "./sidechain-tracker.js";
|
import { ClaudeSidechainTracker } from "./sidechain-tracker.js";
|
||||||
import { buildClaudeFeatures, claudeModelSupportsFastMode } from "./feature-definitions.js";
|
import { buildClaudeFeatures, claudeModelSupportsFastMode } from "./feature-definitions.js";
|
||||||
@@ -1626,23 +1630,6 @@ function extractContextWindowSize(modelUsage: unknown): number | undefined {
|
|||||||
return maxContextWindow;
|
return maxContextWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
function resolveInitialContextWindowSize(modelId: string | null | undefined): number | undefined {
|
|
||||||
const normalized = typeof modelId === "string" ? modelId.trim().toLowerCase() : "";
|
|
||||||
if (!normalized) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
if (normalized.includes("[1m]") || normalized.includes("context-1m")) {
|
|
||||||
return 1_000_000;
|
|
||||||
}
|
|
||||||
if (normalized.includes("claude-fable-5")) {
|
|
||||||
return 1_000_000;
|
|
||||||
}
|
|
||||||
if (/(?:^|[~/_-])(?:claude[-_ ]*)?(opus|sonnet|haiku)(?:$|[-_ ./])/.test(normalized)) {
|
|
||||||
return 200_000;
|
|
||||||
}
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
function readStreamRequestInputTokens(event: Record<string, unknown>): number | undefined {
|
function readStreamRequestInputTokens(event: Record<string, unknown>): number | undefined {
|
||||||
const messageUsage = toObjectRecord(toObjectRecord(event.message)?.usage);
|
const messageUsage = toObjectRecord(toObjectRecord(event.message)?.usage);
|
||||||
if (!messageUsage) {
|
if (!messageUsage) {
|
||||||
@@ -1941,7 +1928,7 @@ class ClaudeAgentSession implements AgentSession {
|
|||||||
this.queryFactory = options.queryFactory;
|
this.queryFactory = options.queryFactory;
|
||||||
this.resolveBinary = options.resolveBinary;
|
this.resolveBinary = options.resolveBinary;
|
||||||
this.contextUsage = new ClaudeContextUsageState(
|
this.contextUsage = new ClaudeContextUsageState(
|
||||||
resolveInitialContextWindowSize(this.config.model),
|
findClaudeModel(this.config.model)?.contextWindowMaxTokens,
|
||||||
);
|
);
|
||||||
const handle = options.handle;
|
const handle = options.handle;
|
||||||
|
|
||||||
@@ -2187,7 +2174,7 @@ class ClaudeAgentSession implements AgentSession {
|
|||||||
await this.applyFastModeFeature(false, activeQuery);
|
await this.applyFastModeFeature(false, activeQuery);
|
||||||
}
|
}
|
||||||
this.contextUsage.setInitialContextWindowMaxTokens(
|
this.contextUsage.setInitialContextWindowMaxTokens(
|
||||||
resolveInitialContextWindowSize(this.config.model),
|
findClaudeModel(this.config.model)?.contextWindowMaxTokens,
|
||||||
);
|
);
|
||||||
this.lastOptionsModel = normalizedModelId ?? this.lastOptionsModel;
|
this.lastOptionsModel = normalizedModelId ?? this.lastOptionsModel;
|
||||||
this.lastRuntimeModel = null;
|
this.lastRuntimeModel = null;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { afterEach, describe, expect, it, vi } from "vitest";
|
|||||||
|
|
||||||
import { createTestLogger } from "../../../../test-utils/test-logger.js";
|
import { createTestLogger } from "../../../../test-utils/test-logger.js";
|
||||||
import { ClaudeAgentClient } from "./agent.js";
|
import { ClaudeAgentClient } from "./agent.js";
|
||||||
import { getClaudeModels, normalizeClaudeRuntimeModelId } from "./models.js";
|
import { findClaudeModel, getClaudeModels, normalizeClaudeRuntimeModelId } from "./models.js";
|
||||||
|
|
||||||
const createdClaudeConfigDirs: string[] = [];
|
const createdClaudeConfigDirs: string[] = [];
|
||||||
|
|
||||||
@@ -38,6 +38,7 @@ describe("getClaudeModels", () => {
|
|||||||
"claude-fable-5",
|
"claude-fable-5",
|
||||||
"claude-opus-4-8[1m]",
|
"claude-opus-4-8[1m]",
|
||||||
"claude-opus-4-8",
|
"claude-opus-4-8",
|
||||||
|
"claude-sonnet-5",
|
||||||
"claude-opus-4-7[1m]",
|
"claude-opus-4-7[1m]",
|
||||||
"claude-opus-4-7",
|
"claude-opus-4-7",
|
||||||
"claude-opus-4-6[1m]",
|
"claude-opus-4-6[1m]",
|
||||||
@@ -55,6 +56,28 @@ describe("getClaudeModels", () => {
|
|||||||
expect(defaults[0].id).toBe("claude-opus-4-8");
|
expect(defaults[0].id).toBe("claude-opus-4-8");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("defines context window sizes in the catalog", () => {
|
||||||
|
const contextWindows = new Map(
|
||||||
|
getClaudeModels().map((model) => [model.id, model.contextWindowMaxTokens]),
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(contextWindows).toEqual(
|
||||||
|
new Map([
|
||||||
|
["claude-fable-5", 1_000_000],
|
||||||
|
["claude-opus-4-8[1m]", 1_000_000],
|
||||||
|
["claude-opus-4-8", 200_000],
|
||||||
|
["claude-sonnet-5", 1_000_000],
|
||||||
|
["claude-opus-4-7[1m]", 1_000_000],
|
||||||
|
["claude-opus-4-7", 200_000],
|
||||||
|
["claude-opus-4-6[1m]", 1_000_000],
|
||||||
|
["claude-opus-4-6", 200_000],
|
||||||
|
["claude-sonnet-4-6[1m]", 1_000_000],
|
||||||
|
["claude-sonnet-4-6", 200_000],
|
||||||
|
["claude-haiku-4-5", 200_000],
|
||||||
|
]),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
it("returns fresh copies each call", () => {
|
it("returns fresh copies each call", () => {
|
||||||
const a = getClaudeModels();
|
const a = getClaudeModels();
|
||||||
const b = getClaudeModels();
|
const b = getClaudeModels();
|
||||||
@@ -201,6 +224,7 @@ describe("ClaudeAgentClient.fetchCatalog", () => {
|
|||||||
describe("normalizeClaudeRuntimeModelId", () => {
|
describe("normalizeClaudeRuntimeModelId", () => {
|
||||||
it("returns exact match for known model IDs", () => {
|
it("returns exact match for known model IDs", () => {
|
||||||
expect(normalizeClaudeRuntimeModelId("claude-fable-5")).toBe("claude-fable-5");
|
expect(normalizeClaudeRuntimeModelId("claude-fable-5")).toBe("claude-fable-5");
|
||||||
|
expect(normalizeClaudeRuntimeModelId("claude-sonnet-5")).toBe("claude-sonnet-5");
|
||||||
expect(normalizeClaudeRuntimeModelId("claude-opus-4-6")).toBe("claude-opus-4-6");
|
expect(normalizeClaudeRuntimeModelId("claude-opus-4-6")).toBe("claude-opus-4-6");
|
||||||
expect(normalizeClaudeRuntimeModelId("claude-opus-4-6[1m]")).toBe("claude-opus-4-6[1m]");
|
expect(normalizeClaudeRuntimeModelId("claude-opus-4-6[1m]")).toBe("claude-opus-4-6[1m]");
|
||||||
expect(normalizeClaudeRuntimeModelId("claude-sonnet-4-6")).toBe("claude-sonnet-4-6");
|
expect(normalizeClaudeRuntimeModelId("claude-sonnet-4-6")).toBe("claude-sonnet-4-6");
|
||||||
@@ -209,6 +233,7 @@ describe("normalizeClaudeRuntimeModelId", () => {
|
|||||||
|
|
||||||
it("normalizes dated model IDs to base model", () => {
|
it("normalizes dated model IDs to base model", () => {
|
||||||
expect(normalizeClaudeRuntimeModelId("claude-fable-5-20260301")).toBe("claude-fable-5");
|
expect(normalizeClaudeRuntimeModelId("claude-fable-5-20260301")).toBe("claude-fable-5");
|
||||||
|
expect(normalizeClaudeRuntimeModelId("claude-sonnet-5-20260101")).toBe("claude-sonnet-5");
|
||||||
expect(normalizeClaudeRuntimeModelId("claude-opus-4-6-20260101")).toBe("claude-opus-4-6");
|
expect(normalizeClaudeRuntimeModelId("claude-opus-4-6-20260101")).toBe("claude-opus-4-6");
|
||||||
expect(normalizeClaudeRuntimeModelId("claude-sonnet-4-6-20260101")).toBe("claude-sonnet-4-6");
|
expect(normalizeClaudeRuntimeModelId("claude-sonnet-4-6-20260101")).toBe("claude-sonnet-4-6");
|
||||||
expect(normalizeClaudeRuntimeModelId("claude-haiku-4-5-20251001")).toBe("claude-haiku-4-5");
|
expect(normalizeClaudeRuntimeModelId("claude-haiku-4-5-20251001")).toBe("claude-haiku-4-5");
|
||||||
@@ -230,3 +255,10 @@ describe("normalizeClaudeRuntimeModelId", () => {
|
|||||||
expect(normalizeClaudeRuntimeModelId("random")).toBeNull();
|
expect(normalizeClaudeRuntimeModelId("random")).toBeNull();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe("findClaudeModel", () => {
|
||||||
|
it("resolves runtime model IDs to catalog entries", () => {
|
||||||
|
expect(findClaudeModel("claude-sonnet-5-20260101")?.id).toBe("claude-sonnet-5");
|
||||||
|
expect(findClaudeModel("claude-sonnet-5[1m]")?.contextWindowMaxTokens).toBe(1_000_000);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const CLAUDE_THINKING_OPTIONS = [
|
|||||||
{ id: "max", label: "Max" },
|
{ id: "max", label: "Max" },
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
const CLAUDE_OPUS_EXTENDED_THINKING_OPTIONS = [
|
const CLAUDE_EXTENDED_THINKING_OPTIONS = [
|
||||||
{ id: "low", label: "Low" },
|
{ id: "low", label: "Low" },
|
||||||
{ id: "medium", label: "Medium" },
|
{ id: "medium", label: "Medium" },
|
||||||
{ id: "high", label: "High" },
|
{ id: "high", label: "High" },
|
||||||
@@ -21,7 +21,7 @@ const CLAUDE_OPUS_EXTENDED_THINKING_OPTIONS = [
|
|||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
const CLAUDE_ULTRACODE_THINKING_OPTIONS = [
|
const CLAUDE_ULTRACODE_THINKING_OPTIONS = [
|
||||||
...CLAUDE_OPUS_EXTENDED_THINKING_OPTIONS,
|
...CLAUDE_EXTENDED_THINKING_OPTIONS,
|
||||||
{ id: "ultracode", label: "Ultracode" },
|
{ id: "ultracode", label: "Ultracode" },
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
@@ -31,6 +31,7 @@ const CLAUDE_MODELS: AgentModelDefinition[] = [
|
|||||||
id: "claude-fable-5",
|
id: "claude-fable-5",
|
||||||
label: "Fable 5",
|
label: "Fable 5",
|
||||||
description: "Fable 5 · Most powerful model",
|
description: "Fable 5 · Most powerful model",
|
||||||
|
contextWindowMaxTokens: 1_000_000,
|
||||||
thinkingOptions: [...CLAUDE_ULTRACODE_THINKING_OPTIONS],
|
thinkingOptions: [...CLAUDE_ULTRACODE_THINKING_OPTIONS],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -38,6 +39,7 @@ const CLAUDE_MODELS: AgentModelDefinition[] = [
|
|||||||
id: "claude-opus-4-8[1m]",
|
id: "claude-opus-4-8[1m]",
|
||||||
label: "Opus 4.8 1M",
|
label: "Opus 4.8 1M",
|
||||||
description: "Opus 4.8 with 1M context window",
|
description: "Opus 4.8 with 1M context window",
|
||||||
|
contextWindowMaxTokens: 1_000_000,
|
||||||
thinkingOptions: [...CLAUDE_ULTRACODE_THINKING_OPTIONS],
|
thinkingOptions: [...CLAUDE_ULTRACODE_THINKING_OPTIONS],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -46,27 +48,39 @@ const CLAUDE_MODELS: AgentModelDefinition[] = [
|
|||||||
label: "Opus 4.8",
|
label: "Opus 4.8",
|
||||||
description: "Opus 4.8 · Latest release",
|
description: "Opus 4.8 · Latest release",
|
||||||
isDefault: true,
|
isDefault: true,
|
||||||
|
contextWindowMaxTokens: 200_000,
|
||||||
thinkingOptions: [...CLAUDE_ULTRACODE_THINKING_OPTIONS],
|
thinkingOptions: [...CLAUDE_ULTRACODE_THINKING_OPTIONS],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
provider: "claude",
|
||||||
|
id: "claude-sonnet-5",
|
||||||
|
label: "Sonnet 5",
|
||||||
|
description: "Sonnet 5 · Best for everyday tasks",
|
||||||
|
contextWindowMaxTokens: 1_000_000,
|
||||||
|
thinkingOptions: [...CLAUDE_EXTENDED_THINKING_OPTIONS],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
provider: "claude",
|
provider: "claude",
|
||||||
id: "claude-opus-4-7[1m]",
|
id: "claude-opus-4-7[1m]",
|
||||||
label: "Opus 4.7 1M",
|
label: "Opus 4.7 1M",
|
||||||
description: "Opus 4.7 with 1M context window",
|
description: "Opus 4.7 with 1M context window",
|
||||||
thinkingOptions: [...CLAUDE_OPUS_EXTENDED_THINKING_OPTIONS],
|
contextWindowMaxTokens: 1_000_000,
|
||||||
|
thinkingOptions: [...CLAUDE_EXTENDED_THINKING_OPTIONS],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
provider: "claude",
|
provider: "claude",
|
||||||
id: "claude-opus-4-7",
|
id: "claude-opus-4-7",
|
||||||
label: "Opus 4.7",
|
label: "Opus 4.7",
|
||||||
description: "Opus 4.7 · Previous release",
|
description: "Opus 4.7 · Previous release",
|
||||||
thinkingOptions: [...CLAUDE_OPUS_EXTENDED_THINKING_OPTIONS],
|
contextWindowMaxTokens: 200_000,
|
||||||
|
thinkingOptions: [...CLAUDE_EXTENDED_THINKING_OPTIONS],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
provider: "claude",
|
provider: "claude",
|
||||||
id: "claude-opus-4-6[1m]",
|
id: "claude-opus-4-6[1m]",
|
||||||
label: "Opus 4.6 1M",
|
label: "Opus 4.6 1M",
|
||||||
description: "Opus 4.6 with 1M context window",
|
description: "Opus 4.6 with 1M context window",
|
||||||
|
contextWindowMaxTokens: 1_000_000,
|
||||||
thinkingOptions: [...CLAUDE_THINKING_OPTIONS],
|
thinkingOptions: [...CLAUDE_THINKING_OPTIONS],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -74,6 +88,7 @@ const CLAUDE_MODELS: AgentModelDefinition[] = [
|
|||||||
id: "claude-opus-4-6",
|
id: "claude-opus-4-6",
|
||||||
label: "Opus 4.6",
|
label: "Opus 4.6",
|
||||||
description: "Opus 4.6 · Most capable for complex work",
|
description: "Opus 4.6 · Most capable for complex work",
|
||||||
|
contextWindowMaxTokens: 200_000,
|
||||||
thinkingOptions: [...CLAUDE_THINKING_OPTIONS],
|
thinkingOptions: [...CLAUDE_THINKING_OPTIONS],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -81,6 +96,7 @@ const CLAUDE_MODELS: AgentModelDefinition[] = [
|
|||||||
id: "claude-sonnet-4-6[1m]",
|
id: "claude-sonnet-4-6[1m]",
|
||||||
label: "Sonnet 4.6 1M",
|
label: "Sonnet 4.6 1M",
|
||||||
description: "Sonnet 4.6 with 1M context window",
|
description: "Sonnet 4.6 with 1M context window",
|
||||||
|
contextWindowMaxTokens: 1_000_000,
|
||||||
thinkingOptions: [...CLAUDE_THINKING_OPTIONS],
|
thinkingOptions: [...CLAUDE_THINKING_OPTIONS],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -88,6 +104,7 @@ const CLAUDE_MODELS: AgentModelDefinition[] = [
|
|||||||
id: "claude-sonnet-4-6",
|
id: "claude-sonnet-4-6",
|
||||||
label: "Sonnet 4.6",
|
label: "Sonnet 4.6",
|
||||||
description: "Sonnet 4.6 · Best for everyday tasks",
|
description: "Sonnet 4.6 · Best for everyday tasks",
|
||||||
|
contextWindowMaxTokens: 200_000,
|
||||||
thinkingOptions: [...CLAUDE_THINKING_OPTIONS],
|
thinkingOptions: [...CLAUDE_THINKING_OPTIONS],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -95,6 +112,7 @@ const CLAUDE_MODELS: AgentModelDefinition[] = [
|
|||||||
id: "claude-haiku-4-5",
|
id: "claude-haiku-4-5",
|
||||||
label: "Haiku 4.5",
|
label: "Haiku 4.5",
|
||||||
description: "Haiku 4.5 · Fastest for quick answers",
|
description: "Haiku 4.5 · Fastest for quick answers",
|
||||||
|
contextWindowMaxTokens: 200_000,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -110,6 +128,16 @@ export function getClaudeModels(): AgentModelDefinition[] {
|
|||||||
return CLAUDE_MODELS.map((model) => ({ ...model }));
|
return CLAUDE_MODELS.map((model) => ({ ...model }));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function findClaudeModel(
|
||||||
|
modelId: string | null | undefined,
|
||||||
|
): AgentModelDefinition | undefined {
|
||||||
|
const normalizedModelId = normalizeClaudeRuntimeModelId(modelId);
|
||||||
|
if (!normalizedModelId) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
return CLAUDE_MODELS.find((model) => model.id === normalizedModelId);
|
||||||
|
}
|
||||||
|
|
||||||
export async function getClaudeModelsWithSettings(
|
export async function getClaudeModelsWithSettings(
|
||||||
logger: Logger,
|
logger: Logger,
|
||||||
configDir?: string,
|
configDir?: string,
|
||||||
@@ -218,13 +246,19 @@ export function normalizeClaudeRuntimeModelId(value: string | null | undefined):
|
|||||||
return trimmed;
|
return trimmed;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fable uses a single-segment version (claude-fable-5), not the {major}-{minor}
|
// Match single-segment major-version model names such as claude-fable-5
|
||||||
// scheme of opus/sonnet/haiku, so match it separately. This maps dated runtime
|
// and claude-sonnet-5, including dated runtime strings from the SDK.
|
||||||
// strings (e.g. claude-fable-5-20260301) back to the catalog ID. No [1m] variant:
|
const singleSegmentMatch = trimmed.match(/(?:claude-)?(fable|opus|sonnet|haiku)[-_ ]+(\d+)/i);
|
||||||
// Fable 5 is natively 1M, so there is no 200K-default model to opt into 1M.
|
if (singleSegmentMatch) {
|
||||||
const fableMatch = trimmed.match(/(?:claude-)?fable[-_ ]+(\d+)/i);
|
const family = singleSegmentMatch[1].toLowerCase();
|
||||||
if (fableMatch) {
|
const major = singleSegmentMatch[2];
|
||||||
return `claude-fable-${fableMatch[1]}`;
|
const suffix = trimmed.toLowerCase().includes("[1m]") ? "[1m]" : "";
|
||||||
|
const candidates = [`claude-${family}-${major}${suffix}`, `claude-${family}-${major}`];
|
||||||
|
for (const candidate of candidates) {
|
||||||
|
if (CLAUDE_MODELS.some((model) => model.id === candidate)) {
|
||||||
|
return candidate;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Match: claude-{family}-{major}-{minor}[1m]? possibly followed by a date suffix
|
// Match: claude-{family}-{major}-{minor}[1m]? possibly followed by a date suffix
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@getpaseo/website",
|
"name": "@getpaseo/website",
|
||||||
"version": "0.1.102",
|
"version": "0.1.103",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user