Skip to content
Merged
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
10 changes: 5 additions & 5 deletions assistant/src/__tests__/config-schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe('AssistantConfigSchema', () => {
const result = AssistantConfigSchema.parse({});
expect(result.provider).toBe('anthropic');
expect(result.model).toBe('claude-opus-4-6');
expect(result.maxTokens).toBe(64000);
expect(result.maxTokens).toBe(16000);
expect(result.apiKeys).toEqual({});
expect(result.thinking).toEqual({ enabled: false, budgetTokens: 10000 });
expect(result.contextWindow).toEqual({
Expand Down Expand Up @@ -1193,7 +1193,7 @@ describe('loadConfig with schema validation', () => {
const config = loadConfig();
expect(config.provider).toBe('anthropic');
expect(config.model).toBe('claude-opus-4-6');
expect(config.maxTokens).toBe(64000);
expect(config.maxTokens).toBe(16000);
expect(config.thinking).toEqual({ enabled: false, budgetTokens: 10000 });
expect(config.contextWindow).toEqual({
enabled: true,
Expand All @@ -1215,7 +1215,7 @@ describe('loadConfig with schema validation', () => {
test('falls back to default for invalid maxTokens', () => {
writeConfig({ maxTokens: -100 });
const config = loadConfig();
expect(config.maxTokens).toBe(64000);
expect(config.maxTokens).toBe(16000);
});

test('falls back to defaults for invalid nested values', () => {
Expand All @@ -1240,13 +1240,13 @@ describe('loadConfig with schema validation', () => {
expect(config.model).toBe('gpt-4');
expect(config.thinking.enabled).toBe(true);
expect(config.thinking.budgetTokens).toBe(5000);
expect(config.maxTokens).toBe(64000);
expect(config.maxTokens).toBe(16000);
});

test('handles no config file', () => {
const config = loadConfig();
expect(config.provider).toBe('anthropic');
expect(config.maxTokens).toBe(64000);
expect(config.maxTokens).toBe(16000);
});

test('partial nested objects get defaults for missing fields', () => {
Expand Down
2 changes: 1 addition & 1 deletion assistant/src/config/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export const AssistantConfigSchema = z.object({
.number({ error: 'maxTokens must be a number' })
.int('maxTokens must be an integer')
.positive('maxTokens must be a positive integer')
.default(64000),
.default(16000),
thinking: ThinkingConfigSchema.default({
enabled: false,
budgetTokens: 10000,
Expand Down