fix: update default model from claude-sonnet-4-5 to claude-sonnet-4-6 (#1390)
CLAUDE_MEM_MODEL defaulted to the deprecated claude-sonnet-4-5 across source, installer, tests, and documentation. Updated all references to claude-sonnet-4-6. Closes #1390 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,7 @@ For simple single-turn queries where you don't need to maintain a session, use `
|
|||||||
import { unstable_v2_prompt } from '@anthropic-ai/claude-agent-sdk'
|
import { unstable_v2_prompt } from '@anthropic-ai/claude-agent-sdk'
|
||||||
|
|
||||||
const result = await unstable_v2_prompt('What is 2 + 2?', {
|
const result = await unstable_v2_prompt('What is 2 + 2?', {
|
||||||
model: 'claude-sonnet-4-5-20250929'
|
model: 'claude-sonnet-4-6-20250929'
|
||||||
})
|
})
|
||||||
console.log(result.result)
|
console.log(result.result)
|
||||||
```
|
```
|
||||||
@@ -45,7 +45,7 @@ import { query } from '@anthropic-ai/claude-agent-sdk'
|
|||||||
|
|
||||||
const q = query({
|
const q = query({
|
||||||
prompt: 'What is 2 + 2?',
|
prompt: 'What is 2 + 2?',
|
||||||
options: { model: 'claude-sonnet-4-5-20250929' }
|
options: { model: 'claude-sonnet-4-6-20250929' }
|
||||||
})
|
})
|
||||||
|
|
||||||
for await (const msg of q) {
|
for await (const msg of q) {
|
||||||
@@ -71,7 +71,7 @@ The example below creates a session, sends "Hello!" to Claude, and prints the te
|
|||||||
import { unstable_v2_createSession } from '@anthropic-ai/claude-agent-sdk'
|
import { unstable_v2_createSession } from '@anthropic-ai/claude-agent-sdk'
|
||||||
|
|
||||||
await using session = unstable_v2_createSession({
|
await using session = unstable_v2_createSession({
|
||||||
model: 'claude-sonnet-4-5-20250929'
|
model: 'claude-sonnet-4-6-20250929'
|
||||||
})
|
})
|
||||||
|
|
||||||
await session.send('Hello!')
|
await session.send('Hello!')
|
||||||
@@ -97,7 +97,7 @@ import { query } from '@anthropic-ai/claude-agent-sdk'
|
|||||||
|
|
||||||
const q = query({
|
const q = query({
|
||||||
prompt: 'Hello!',
|
prompt: 'Hello!',
|
||||||
options: { model: 'claude-sonnet-4-5-20250929' }
|
options: { model: 'claude-sonnet-4-6-20250929' }
|
||||||
})
|
})
|
||||||
|
|
||||||
for await (const msg of q) {
|
for await (const msg of q) {
|
||||||
@@ -123,7 +123,7 @@ This example asks a math question, then asks a follow-up that references the pre
|
|||||||
import { unstable_v2_createSession } from '@anthropic-ai/claude-agent-sdk'
|
import { unstable_v2_createSession } from '@anthropic-ai/claude-agent-sdk'
|
||||||
|
|
||||||
await using session = unstable_v2_createSession({
|
await using session = unstable_v2_createSession({
|
||||||
model: 'claude-sonnet-4-5-20250929'
|
model: 'claude-sonnet-4-6-20250929'
|
||||||
})
|
})
|
||||||
|
|
||||||
// Turn 1
|
// Turn 1
|
||||||
@@ -177,7 +177,7 @@ async function* createInputStream() {
|
|||||||
|
|
||||||
const q = query({
|
const q = query({
|
||||||
prompt: createInputStream(),
|
prompt: createInputStream(),
|
||||||
options: { model: 'claude-sonnet-4-5-20250929' }
|
options: { model: 'claude-sonnet-4-6-20250929' }
|
||||||
})
|
})
|
||||||
|
|
||||||
for await (const msg of q) {
|
for await (const msg of q) {
|
||||||
@@ -217,7 +217,7 @@ function getAssistantText(msg: SDKMessage): string | null {
|
|||||||
|
|
||||||
// Create initial session and have a conversation
|
// Create initial session and have a conversation
|
||||||
const session = unstable_v2_createSession({
|
const session = unstable_v2_createSession({
|
||||||
model: 'claude-sonnet-4-5-20250929'
|
model: 'claude-sonnet-4-6-20250929'
|
||||||
})
|
})
|
||||||
|
|
||||||
await session.send('Remember this number: 42')
|
await session.send('Remember this number: 42')
|
||||||
@@ -235,7 +235,7 @@ session.close()
|
|||||||
|
|
||||||
// Later: resume the session using the stored ID
|
// Later: resume the session using the stored ID
|
||||||
await using resumedSession = unstable_v2_resumeSession(sessionId!, {
|
await using resumedSession = unstable_v2_resumeSession(sessionId!, {
|
||||||
model: 'claude-sonnet-4-5-20250929'
|
model: 'claude-sonnet-4-6-20250929'
|
||||||
})
|
})
|
||||||
|
|
||||||
await resumedSession.send('What number did I ask you to remember?')
|
await resumedSession.send('What number did I ask you to remember?')
|
||||||
@@ -254,7 +254,7 @@ import { query } from '@anthropic-ai/claude-agent-sdk'
|
|||||||
// Create initial session
|
// Create initial session
|
||||||
const initialQuery = query({
|
const initialQuery = query({
|
||||||
prompt: 'Remember this number: 42',
|
prompt: 'Remember this number: 42',
|
||||||
options: { model: 'claude-sonnet-4-5-20250929' }
|
options: { model: 'claude-sonnet-4-6-20250929' }
|
||||||
})
|
})
|
||||||
|
|
||||||
// Get session ID from any message
|
// Get session ID from any message
|
||||||
@@ -276,7 +276,7 @@ console.log('Session ID:', sessionId)
|
|||||||
const resumedQuery = query({
|
const resumedQuery = query({
|
||||||
prompt: 'What number did I ask you to remember?',
|
prompt: 'What number did I ask you to remember?',
|
||||||
options: {
|
options: {
|
||||||
model: 'claude-sonnet-4-5-20250929',
|
model: 'claude-sonnet-4-6-20250929',
|
||||||
resume: sessionId
|
resume: sessionId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -304,7 +304,7 @@ Sessions can be closed manually or automatically using [`await using`](https://w
|
|||||||
import { unstable_v2_createSession } from '@anthropic-ai/claude-agent-sdk'
|
import { unstable_v2_createSession } from '@anthropic-ai/claude-agent-sdk'
|
||||||
|
|
||||||
await using session = unstable_v2_createSession({
|
await using session = unstable_v2_createSession({
|
||||||
model: 'claude-sonnet-4-5-20250929'
|
model: 'claude-sonnet-4-6-20250929'
|
||||||
})
|
})
|
||||||
// Session closes automatically when the block exits
|
// Session closes automatically when the block exits
|
||||||
```
|
```
|
||||||
@@ -315,7 +315,7 @@ await using session = unstable_v2_createSession({
|
|||||||
import { unstable_v2_createSession } from '@anthropic-ai/claude-agent-sdk'
|
import { unstable_v2_createSession } from '@anthropic-ai/claude-agent-sdk'
|
||||||
|
|
||||||
const session = unstable_v2_createSession({
|
const session = unstable_v2_createSession({
|
||||||
model: 'claude-sonnet-4-5-20250929'
|
model: 'claude-sonnet-4-6-20250929'
|
||||||
})
|
})
|
||||||
// ... use the session ...
|
// ... use the session ...
|
||||||
session.close()
|
session.close()
|
||||||
|
|||||||
@@ -860,7 +860,7 @@ async startSession(session: ActiveSession, worker?: any) {
|
|||||||
const queryResult = query({
|
const queryResult = query({
|
||||||
prompt: messageGenerator,
|
prompt: messageGenerator,
|
||||||
options: {
|
options: {
|
||||||
model: 'claude-sonnet-4-5',
|
model: 'claude-sonnet-4-6',
|
||||||
disallowedTools: ['Bash', 'Read', 'Write', ...], // Observer-only
|
disallowedTools: ['Bash', 'Read', 'Write', ...], // Observer-only
|
||||||
abortController: session.abortController
|
abortController: session.abortController
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ GET /api/context/recent?project=my-project&limit=3
|
|||||||
### Environment Variables
|
### Environment Variables
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
CLAUDE_MEM_MODEL=claude-sonnet-4-5 # Model for observations/summaries
|
CLAUDE_MEM_MODEL=claude-sonnet-4-6 # Model for observations/summaries
|
||||||
CLAUDE_MEM_CONTEXT_OBSERVATIONS=50 # Observations injected at SessionStart
|
CLAUDE_MEM_CONTEXT_OBSERVATIONS=50 # Observations injected at SessionStart
|
||||||
CLAUDE_MEM_WORKER_PORT=37777 # Worker service port
|
CLAUDE_MEM_WORKER_PORT=37777 # Worker service port
|
||||||
CLAUDE_MEM_PYTHON_VERSION=3.13 # Python version for chroma-mcp
|
CLAUDE_MEM_PYTHON_VERSION=3.13 # Python version for chroma-mcp
|
||||||
|
|||||||
+1
-1
@@ -1101,7 +1101,7 @@ write_settings() {
|
|||||||
|
|
||||||
// All defaults from SettingsDefaultsManager.ts
|
// All defaults from SettingsDefaultsManager.ts
|
||||||
const defaults = {
|
const defaults = {
|
||||||
CLAUDE_MEM_MODEL: 'claude-sonnet-4-5',
|
CLAUDE_MEM_MODEL: 'claude-sonnet-4-6',
|
||||||
CLAUDE_MEM_CONTEXT_OBSERVATIONS: '50',
|
CLAUDE_MEM_CONTEXT_OBSERVATIONS: '50',
|
||||||
CLAUDE_MEM_WORKER_PORT: '37777',
|
CLAUDE_MEM_WORKER_PORT: '37777',
|
||||||
CLAUDE_MEM_WORKER_HOST: '127.0.0.1',
|
CLAUDE_MEM_WORKER_HOST: '127.0.0.1',
|
||||||
|
|||||||
@@ -643,7 +643,7 @@ test_write_settings_new_file() {
|
|||||||
|
|
||||||
local model
|
local model
|
||||||
model="$(node -e "const s = JSON.parse(require('fs').readFileSync('${settings_file}','utf8')); console.log(s.CLAUDE_MEM_MODEL);")"
|
model="$(node -e "const s = JSON.parse(require('fs').readFileSync('${settings_file}','utf8')); console.log(s.CLAUDE_MEM_MODEL);")"
|
||||||
assert_eq "claude-sonnet-4-5" "$model" "CLAUDE_MEM_MODEL defaults to claude-sonnet-4-5"
|
assert_eq "claude-sonnet-4-6" "$model" "CLAUDE_MEM_MODEL defaults to claude-sonnet-4-6"
|
||||||
|
|
||||||
HOME="$ORIGINAL_HOME"
|
HOME="$ORIGINAL_HOME"
|
||||||
rm -rf "$fake_home"
|
rm -rf "$fake_home"
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export class SettingsDefaultsManager {
|
|||||||
* Default values for all settings
|
* Default values for all settings
|
||||||
*/
|
*/
|
||||||
private static readonly DEFAULTS: SettingsDefaults = {
|
private static readonly DEFAULTS: SettingsDefaults = {
|
||||||
CLAUDE_MEM_MODEL: 'claude-sonnet-4-5',
|
CLAUDE_MEM_MODEL: 'claude-sonnet-4-6',
|
||||||
CLAUDE_MEM_CONTEXT_OBSERVATIONS: '50',
|
CLAUDE_MEM_CONTEXT_OBSERVATIONS: '50',
|
||||||
CLAUDE_MEM_WORKER_PORT: '37777',
|
CLAUDE_MEM_WORKER_PORT: '37777',
|
||||||
CLAUDE_MEM_WORKER_HOST: '127.0.0.1',
|
CLAUDE_MEM_WORKER_HOST: '127.0.0.1',
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Shared across UI components and hooks
|
* Shared across UI components and hooks
|
||||||
*/
|
*/
|
||||||
export const DEFAULT_SETTINGS = {
|
export const DEFAULT_SETTINGS = {
|
||||||
CLAUDE_MEM_MODEL: 'claude-sonnet-4-5',
|
CLAUDE_MEM_MODEL: 'claude-sonnet-4-6',
|
||||||
CLAUDE_MEM_CONTEXT_OBSERVATIONS: '50',
|
CLAUDE_MEM_CONTEXT_OBSERVATIONS: '50',
|
||||||
CLAUDE_MEM_WORKER_PORT: '37777',
|
CLAUDE_MEM_WORKER_PORT: '37777',
|
||||||
CLAUDE_MEM_WORKER_HOST: '127.0.0.1',
|
CLAUDE_MEM_WORKER_HOST: '127.0.0.1',
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ describe('SettingsDefaultsManager', () => {
|
|||||||
|
|
||||||
describe('get', () => {
|
describe('get', () => {
|
||||||
it('should return default value for key', () => {
|
it('should return default value for key', () => {
|
||||||
expect(SettingsDefaultsManager.get('CLAUDE_MEM_MODEL')).toBe('claude-sonnet-4-5');
|
expect(SettingsDefaultsManager.get('CLAUDE_MEM_MODEL')).toBe('claude-sonnet-4-6');
|
||||||
expect(SettingsDefaultsManager.get('CLAUDE_MEM_WORKER_PORT')).toBe('37777');
|
expect(SettingsDefaultsManager.get('CLAUDE_MEM_WORKER_PORT')).toBe('37777');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user