@orxataguy/tyr 1.0.33 → 1.0.34
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
|
@@ -130,11 +130,6 @@ const RETRY_BASE_DELAY_MS = 500;
|
|
|
130
130
|
// touching code. 'balanced' matches DEFAULT_MODELS on purpose — it's the vendor's normal default.
|
|
131
131
|
type ModelTier = 'cheap' | 'balanced' | 'flagship';
|
|
132
132
|
|
|
133
|
-
const MODEL_TIERS: Record<AIVendor, Record<ModelTier, string>> = {
|
|
134
|
-
anthropic: { cheap: 'claude-haiku-4-5', balanced: 'claude-sonnet-5', flagship: 'claude-opus-4-1' },
|
|
135
|
-
openai: { cheap: 'gpt-4o-mini', balanced: 'gpt-4o-mini', flagship: 'gpt-4o' },
|
|
136
|
-
gemini: { cheap: 'gemini-2.5-flash', balanced: 'gemini-2.5-pro', flagship: 'gemini-2.5-pro' },
|
|
137
|
-
};
|
|
138
133
|
|
|
139
134
|
const MODEL_TIER_ENV: Record<AIVendor, Record<ModelTier, string>> = {
|
|
140
135
|
anthropic: { cheap: 'ANTHROPIC_AI_MODEL_CHEAP', balanced: 'ANTHROPIC_AI_MODEL_BALANCED', flagship: 'ANTHROPIC_AI_MODEL_FLAGSHIP' },
|
|
@@ -142,6 +137,13 @@ const MODEL_TIER_ENV: Record<AIVendor, Record<ModelTier, string>> = {
|
|
|
142
137
|
gemini: { cheap: 'GEMINI_AI_MODEL_CHEAP', balanced: 'GEMINI_AI_MODEL_BALANCED', flagship: 'GEMINI_AI_MODEL_FLAGSHIP' },
|
|
143
138
|
};
|
|
144
139
|
|
|
140
|
+
|
|
141
|
+
const MODEL_TIER_DEFAULT: Record<string,string> = {
|
|
142
|
+
anthropic: 'claude-haiku-4-5-20251001',
|
|
143
|
+
openai: 'gpt-4o-mini-2024-07-18',
|
|
144
|
+
gemini: 'gemini-2.5-flash-lite',
|
|
145
|
+
};
|
|
146
|
+
|
|
145
147
|
/** budget_tokens sent to Anthropic's `thinking` param per effort level. 'none' disables thinking. */
|
|
146
148
|
const THINKING_BUDGETS: Record<ThinkingEffort, number> = {
|
|
147
149
|
none: 0,
|
|
@@ -260,7 +262,7 @@ export class AIVendorManager {
|
|
|
260
262
|
throw new TyrError(`Unknown task priority: '${priority}'`, null, `Use one of: ${PRIORITY_LADDER.join(', ')}`);
|
|
261
263
|
}
|
|
262
264
|
|
|
263
|
-
const tierModel = getEnvString(MODEL_TIER_ENV[vendor][route.tier]
|
|
265
|
+
const tierModel = getEnvString(MODEL_TIER_ENV[vendor][route.tier], MODEL_TIER_DEFAULT[vendor]);
|
|
264
266
|
|
|
265
267
|
return {
|
|
266
268
|
vendor,
|