synthos 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -54,7 +54,7 @@ export async function classifyRequest(
|
|
|
54
54
|
userMessage: string
|
|
55
55
|
): Promise<ClassifyResult> {
|
|
56
56
|
try {
|
|
57
|
-
const sonnet = createAnthropicModel({ apiKey, model: 'claude-sonnet-4-
|
|
57
|
+
const sonnet = createAnthropicModel({ apiKey, model: 'claude-sonnet-4-6' });
|
|
58
58
|
const result = await sonnet({
|
|
59
59
|
system: { role: 'system', content: CLASSIFIER_SYSTEM_PROMPT },
|
|
60
60
|
prompt: { role: 'user', content: `<PAGE_HTML>\n${pageHtml}\n\n<USER_MESSAGE>\n${userMessage}` },
|
|
@@ -147,14 +147,14 @@ export function createAnthropicBuilder(
|
|
|
147
147
|
|
|
148
148
|
// Easy changes use Sonnet with default schema (ranged allowed)
|
|
149
149
|
if (classifyResult.classification === 'easy-change') {
|
|
150
|
-
let sonnet: completePrompt = createAnthropicModel({ apiKey: options.apiKey, model: 'claude-sonnet-4-
|
|
150
|
+
let sonnet: completePrompt = createAnthropicModel({ apiKey: options.apiKey, model: 'claude-sonnet-4-6' });
|
|
151
151
|
if (options.wrapModel) sonnet = options.wrapModel(sonnet);
|
|
152
152
|
return buildWithModel(sonnet, currentPage, additionalSections, userMessage, userInstructions, name, attachments);
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
// Medium changes use Sonnet with no ranged writes
|
|
156
156
|
if (classifyResult.classification === 'medium-change') {
|
|
157
|
-
let sonnet: completePrompt = createAnthropicModel({ apiKey: options.apiKey, model: 'claude-sonnet-4-
|
|
157
|
+
let sonnet: completePrompt = createAnthropicModel({ apiKey: options.apiKey, model: 'claude-sonnet-4-6' });
|
|
158
158
|
if (options.wrapModel) sonnet = options.wrapModel(sonnet);
|
|
159
159
|
return buildWithModel(sonnet, currentPage, additionalSections, userMessage, userInstructions, name, attachments, noRanged);
|
|
160
160
|
}
|
|
@@ -243,8 +243,8 @@ export async function buildWithModel(
|
|
|
243
243
|
|
|
244
244
|
function routeLabel(classification: Classification, configuredModel: string): string {
|
|
245
245
|
if (classification === 'question') return 'classifier (answered inline)';
|
|
246
|
-
if (classification === 'easy-change') return 'claude-sonnet-4-
|
|
247
|
-
if (classification === 'medium-change') return 'claude-sonnet-4-
|
|
246
|
+
if (classification === 'easy-change') return 'claude-sonnet-4-6';
|
|
247
|
+
if (classification === 'medium-change') return 'claude-sonnet-4-6 (no ranged)';
|
|
248
248
|
if (classification === 're-write') return configuredModel + ' (re-write)';
|
|
249
249
|
return configuredModel + ' (no ranged)';
|
|
250
250
|
}
|
package/src/models/providers.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { Provider, ProviderName } from './types';
|
|
|
2
2
|
|
|
3
3
|
export const AnthropicProvider: Provider = {
|
|
4
4
|
name: 'Anthropic',
|
|
5
|
-
builderModels: ['claude-opus-4-6', 'claude-sonnet-4-
|
|
6
|
-
chatModels: ['claude-sonnet-4-
|
|
5
|
+
builderModels: ['claude-opus-4-6', 'claude-sonnet-4-6'],
|
|
6
|
+
chatModels: ['claude-sonnet-4-6','claude-haiku-4-5'],
|
|
7
7
|
detectModel(model: string): boolean {
|
|
8
8
|
return model.startsWith('claude-');
|
|
9
9
|
}
|
package/tests/builders.spec.ts
CHANGED
|
@@ -46,7 +46,7 @@ describe('Anthropic Builder — Haiku Classifier Routing', () => {
|
|
|
46
46
|
|
|
47
47
|
const builder = createAnthropicBuilder(tracker.fn, undefined, 'SynthOS', {
|
|
48
48
|
apiKey: 'test-key',
|
|
49
|
-
model: 'claude-sonnet-4-
|
|
49
|
+
model: 'claude-sonnet-4-6-20250514',
|
|
50
50
|
});
|
|
51
51
|
|
|
52
52
|
const result = await builder.run(currentPage, additionalSections, 'change heading', false);
|
|
@@ -113,7 +113,7 @@ describe('Anthropic Builder — Haiku Classifier Routing', () => {
|
|
|
113
113
|
// Non-Opus model should just work without classification
|
|
114
114
|
const builder = createBuilder('Anthropic', tracker.fn, undefined, 'SynthOS', {
|
|
115
115
|
apiKey: 'key',
|
|
116
|
-
model: 'claude-sonnet-4-
|
|
116
|
+
model: 'claude-sonnet-4-6-20250514',
|
|
117
117
|
});
|
|
118
118
|
|
|
119
119
|
const result = await builder.run(currentPage, additionalSections, 'test', false);
|
package/tests/providers.spec.ts
CHANGED
|
@@ -39,7 +39,7 @@ describe('getProvider', () => {
|
|
|
39
39
|
|
|
40
40
|
describe('detectProvider', () => {
|
|
41
41
|
it('detects Anthropic from claude- prefix', () => {
|
|
42
|
-
const p = detectProvider('claude-sonnet-4-
|
|
42
|
+
const p = detectProvider('claude-sonnet-4-6');
|
|
43
43
|
assert.strictEqual(p?.name, 'Anthropic');
|
|
44
44
|
});
|
|
45
45
|
|