@usabledev/usable-chat 1.215.13 → 1.216.0
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/cli.js +68 -28
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -45618,11 +45618,19 @@ var init_tui_select = __esm({
|
|
|
45618
45618
|
}
|
|
45619
45619
|
});
|
|
45620
45620
|
|
|
45621
|
+
// src/lib/haiku-model-pricing.ts
|
|
45622
|
+
var init_haiku_model_pricing = __esm({
|
|
45623
|
+
"src/lib/haiku-model-pricing.ts"() {
|
|
45624
|
+
"use strict";
|
|
45625
|
+
}
|
|
45626
|
+
});
|
|
45627
|
+
|
|
45621
45628
|
// src/lib/image-model-pricing.ts
|
|
45622
45629
|
var OPENAI_IMAGE_TEXT_INPUT_PER_TOKEN, OPENAI_IMAGE_OUTPUT_PER_TOKEN, OPENAI_IMAGE_COST_MULTIPLIER, OPENAI_IMAGE_RATES, OPENAI_IMAGE_MODEL_PRICING;
|
|
45623
45630
|
var init_image_model_pricing = __esm({
|
|
45624
45631
|
"src/lib/image-model-pricing.ts"() {
|
|
45625
45632
|
"use strict";
|
|
45633
|
+
init_haiku_model_pricing();
|
|
45626
45634
|
OPENAI_IMAGE_TEXT_INPUT_PER_TOKEN = 5e-6;
|
|
45627
45635
|
OPENAI_IMAGE_OUTPUT_PER_TOKEN = 3e-5;
|
|
45628
45636
|
OPENAI_IMAGE_COST_MULTIPLIER = 50;
|
|
@@ -45707,6 +45715,11 @@ var init_model_pricing = __esm({
|
|
|
45707
45715
|
output: 5e-5,
|
|
45708
45716
|
multiplier: 80
|
|
45709
45717
|
},
|
|
45718
|
+
"anthropic/claude-haiku-5.5": {
|
|
45719
|
+
input: 1e-7,
|
|
45720
|
+
output: 5e-7,
|
|
45721
|
+
multiplier: 1
|
|
45722
|
+
},
|
|
45710
45723
|
"anthropic/claude-haiku-4.5": {
|
|
45711
45724
|
input: 1e-6,
|
|
45712
45725
|
output: 5e-6,
|
|
@@ -47009,6 +47022,16 @@ var init_model_registry_generated = __esm({
|
|
|
47009
47022
|
"src/lib/model-registry-generated.ts"() {
|
|
47010
47023
|
"use strict";
|
|
47011
47024
|
GENERATED_MODELS = [
|
|
47025
|
+
{
|
|
47026
|
+
id: "anthropic/claude-haiku-5.5",
|
|
47027
|
+
displayName: "Claude Haiku 5.5",
|
|
47028
|
+
vendor: "anthropic",
|
|
47029
|
+
category: "fast",
|
|
47030
|
+
capabilities: { vision: true, reasoning: true, maxTokens: 128e3, contextLength: 1e6 },
|
|
47031
|
+
pricing: { inputPer1M: 0.1, outputPer1M: 0.5, multiplier: 1 },
|
|
47032
|
+
availability: { mainChat: false, experts: true, embeds: true },
|
|
47033
|
+
createdAt: 1791397883
|
|
47034
|
+
},
|
|
47012
47035
|
{
|
|
47013
47036
|
id: "openai/gpt-6.1-sol",
|
|
47014
47037
|
displayName: "GPT-6.1 Sol",
|
|
@@ -52715,6 +52738,11 @@ var init_model_registry = __esm({
|
|
|
52715
52738
|
init_model_registry_generated();
|
|
52716
52739
|
BEDROCK_MODEL_DEFS = {
|
|
52717
52740
|
// Claude 4.x+ — require cross-region inference profiles
|
|
52741
|
+
// Launch-day Geo CRIS profile, using the documented unsuffixed model ID.
|
|
52742
|
+
"claude-haiku-5-5": {
|
|
52743
|
+
bedrockId: "anthropic.claude-haiku-5-5",
|
|
52744
|
+
crossRegion: true
|
|
52745
|
+
},
|
|
52718
52746
|
"claude-haiku-4-5-20251001": {
|
|
52719
52747
|
bedrockId: "anthropic.claude-haiku-4-5-20251001-v1:0",
|
|
52720
52748
|
crossRegion: true
|
|
@@ -138231,7 +138259,7 @@ function normalizeClaudeModelId(modelId) {
|
|
|
138231
138259
|
}
|
|
138232
138260
|
function usesAdaptiveThinking(modelId) {
|
|
138233
138261
|
const id = normalizeClaudeModelId(modelId);
|
|
138234
|
-
return id.includes("claude-opus-4-7") || id.includes("claude-opus-4-8") || id.includes("claude-opus-5") || id.includes("claude-sonnet-5") || id.includes("claude-fable-5");
|
|
138262
|
+
return id.includes("claude-opus-4-7") || id.includes("claude-opus-4-8") || id.includes("claude-opus-5") || id.includes("claude-sonnet-5") || id.includes("claude-fable-5") || id.includes("claude-haiku-5");
|
|
138235
138263
|
}
|
|
138236
138264
|
function supportsSamplingParameters(modelId) {
|
|
138237
138265
|
return !usesAdaptiveThinking(modelId);
|
|
@@ -138243,6 +138271,17 @@ function prepareClaudeRequestForModel(request) {
|
|
|
138243
138271
|
const { temperature: _temperature, ...rest } = request;
|
|
138244
138272
|
return rest;
|
|
138245
138273
|
}
|
|
138274
|
+
function getClaudeThinkingConfig(model, enabled2, effort, legacyBudget) {
|
|
138275
|
+
const isHaiku5 = normalizeClaudeModelId(model).includes("claude-haiku-5");
|
|
138276
|
+
if (isHaiku5 && (!enabled2 || !effort)) {
|
|
138277
|
+
return { thinking: { type: "disabled" }, output_config: { effort: "medium" } };
|
|
138278
|
+
}
|
|
138279
|
+
if (!enabled2 || !isHaiku5 && effort !== "high") return {};
|
|
138280
|
+
if (usesAdaptiveThinking(model)) {
|
|
138281
|
+
return { thinking: { type: "adaptive" }, output_config: { effort: effort ?? "medium" } };
|
|
138282
|
+
}
|
|
138283
|
+
return legacyBudget ? { thinking: { type: "enabled", budget_tokens: legacyBudget } } : {};
|
|
138284
|
+
}
|
|
138246
138285
|
function convertToClaudeMessages(messages4, systemMessage) {
|
|
138247
138286
|
const claudeMessages = [];
|
|
138248
138287
|
let system = systemMessage;
|
|
@@ -138738,6 +138777,7 @@ function extractClaudeModel(modelId) {
|
|
|
138738
138777
|
// Claude Fable models
|
|
138739
138778
|
"anthropic/claude-fable-5": "claude-fable-5",
|
|
138740
138779
|
"anthropic/claude-fable-5.1": "claude-fable-5-1",
|
|
138780
|
+
"anthropic/claude-haiku-5.5": "claude-haiku-5-5",
|
|
138741
138781
|
// Claude Haiku 4.5 models
|
|
138742
138782
|
"anthropic/claude-haiku-4.5": "claude-haiku-4-5-20251001",
|
|
138743
138783
|
"anthropic/claude-4.5-haiku": "claude-haiku-4-5-20251001",
|
|
@@ -175712,8 +175752,9 @@ var init_model_tiers = __esm({
|
|
|
175712
175752
|
name: "General Purpose",
|
|
175713
175753
|
models: [
|
|
175714
175754
|
{
|
|
175715
|
-
id: "anthropic/claude-haiku-
|
|
175716
|
-
|
|
175755
|
+
id: "anthropic/claude-haiku-5.5",
|
|
175756
|
+
effort: "medium",
|
|
175757
|
+
displayName: "Claude Haiku 5.5",
|
|
175717
175758
|
description: "Fast agentic responses, strong tool use and instruction following",
|
|
175718
175759
|
provider: "Anthropic",
|
|
175719
175760
|
zdr: true
|
|
@@ -176532,8 +176573,8 @@ function getModelById2(modelId) {
|
|
|
176532
176573
|
}
|
|
176533
176574
|
function mapModeToModel(modeId) {
|
|
176534
176575
|
const modeMap = {
|
|
176535
|
-
standard: "anthropic/claude-haiku-
|
|
176536
|
-
"quick-thinking": "anthropic/claude-haiku-
|
|
176576
|
+
standard: "anthropic/claude-haiku-5.5",
|
|
176577
|
+
"quick-thinking": "anthropic/claude-haiku-5.5",
|
|
176537
176578
|
"deep-thinking": "anthropic/claude-sonnet-5.5",
|
|
176538
176579
|
"multi-lingual": "google/gemini-3.1-pro-preview",
|
|
176539
176580
|
"standard-fallback": "openai/gpt-5-mini"
|
|
@@ -176558,6 +176599,7 @@ var init_model_config = __esm({
|
|
|
176558
176599
|
"anthropic/claude-sonnet-4.6": { vision: true, reasoning: true },
|
|
176559
176600
|
"anthropic/claude-sonnet-5": { vision: true, reasoning: true },
|
|
176560
176601
|
"anthropic/claude-sonnet-5.5": { vision: true, reasoning: true },
|
|
176602
|
+
"anthropic/claude-haiku-5.5": { vision: true, reasoning: true },
|
|
176561
176603
|
"anthropic/claude-haiku-4.5": { vision: true, reasoning: true },
|
|
176562
176604
|
"anthropic/claude-4.5-haiku": { vision: true, reasoning: true },
|
|
176563
176605
|
"anthropic/claude-4.5-sonnet": { vision: true, reasoning: true },
|
|
@@ -216468,6 +216510,12 @@ function getReasoningConfig(modelId, hasReasoningCapability = false, forceEnable
|
|
|
216468
216510
|
const modelName = modelId.split("/")[1];
|
|
216469
216511
|
switch (provider) {
|
|
216470
216512
|
case "anthropic":
|
|
216513
|
+
if (modelName.includes("claude-haiku-5")) {
|
|
216514
|
+
return {
|
|
216515
|
+
enabled: true,
|
|
216516
|
+
providerOptions: { reasoning: { enabled: true, effort: reasoningEffort } }
|
|
216517
|
+
};
|
|
216518
|
+
}
|
|
216471
216519
|
if (modelName.includes("claude-sonnet-4") || modelName.includes("claude-haiku-4") || modelName.includes("claude-4.5-sonnet") || modelName.includes("claude-4.5-haiku") || modelName.includes("claude-4") || modelName.includes("claude-3.7-sonnet") || modelName.includes("claude-3.5-sonnet-20241022")) {
|
|
216472
216520
|
const effort = reasoningEffort || "high";
|
|
216473
216521
|
const effortRatio = effort === "high" ? 0.8 : effort === "medium" ? 0.5 : 0.2;
|
|
@@ -220691,8 +220739,8 @@ HOW TO USE THIS:
|
|
|
220691
220739
|
**Parameters**
|
|
220692
220740
|
- \`description\`: one-line label that shows in the user's dock card (\u2264120 chars).
|
|
220693
220741
|
- \`prompt\`: the actual work task. The subagent receives this as its user message.
|
|
220694
|
-
- \`model\`: **default to \`quick-thinking\` (alias for \`anthropic/claude-haiku-
|
|
220695
|
-
- **\`quick-thinking\` / \`anthropic/claude-haiku-
|
|
220742
|
+
- \`model\`: **default to \`quick-thinking\` (alias for \`anthropic/claude-haiku-5.5\`) unless you have a specific reason not to.** Subagents are billed in addition to your own turn \u2014 every Sonnet-class subagent doubles cost. Guidance:
|
|
220743
|
+
- **\`quick-thinking\` / \`anthropic/claude-haiku-5.5\`** (cheapest, fast, strong tool use) \u2014 use this for: web/Usable search, summarisation, classification, simple extraction, drafting, tabular work, anything where one-shot quality is "good enough". Should be your **default**.
|
|
220696
220744
|
- **\`google/gemini-3.8-flash\`** (cheap, huge context, multimodal/multi-lingual) \u2014 use this when: you need to read a 100k+-token document, the task is multi-lingual, or there's image/audio input.
|
|
220697
220745
|
- **\`deep-thinking\` / \`anthropic/claude-sonnet-5.5\`** (5\u201310\xD7 the cost of Haiku) \u2014 only use when: the work requires multi-step reasoning over conflicting evidence, code generation against a specific architecture, or careful policy/risk judgement. If you find yourself reaching for this for "research", reach for Haiku first.
|
|
220698
220746
|
- **\`google/gemini-3.1-pro-preview\`** \u2014 only when both massive context AND deep reasoning are required.
|
|
@@ -366428,14 +366476,19 @@ async function callLLM({
|
|
|
366428
366476
|
|
|
366429
366477
|
${systemMessage}` : systemMessage : claudeMessages.system;
|
|
366430
366478
|
const reasoningOptions = reasoningConfig.providerOptions?.reasoning;
|
|
366431
|
-
const
|
|
366432
|
-
|
|
366433
|
-
|
|
366479
|
+
const thinkingConfig = getClaudeThinkingConfig(
|
|
366480
|
+
claudeModel,
|
|
366481
|
+
reasoningConfig.enabled,
|
|
366482
|
+
reasoningEffort,
|
|
366483
|
+
reasoningOptions?.max_tokens
|
|
366484
|
+
);
|
|
366485
|
+
const legacyThinkingEnabled = thinkingConfig.thinking?.type === "enabled";
|
|
366434
366486
|
const claudeRequest = {
|
|
366435
366487
|
model: claudeModel,
|
|
366436
366488
|
messages: claudeMessages.messages,
|
|
366437
366489
|
system: mergedSystem,
|
|
366438
|
-
max_tokens: maxTokens
|
|
366490
|
+
max_tokens: maxTokens,
|
|
366491
|
+
...thinkingConfig
|
|
366439
366492
|
};
|
|
366440
366493
|
if (supportsSamplingParameters(claudeModel)) {
|
|
366441
366494
|
claudeRequest.temperature = legacyThinkingEnabled ? 1 : temperature;
|
|
@@ -366443,19 +366496,6 @@ ${systemMessage}` : systemMessage : claudeMessages.system;
|
|
|
366443
366496
|
if (shouldEnableTools && tools && tools.length > 0) {
|
|
366444
366497
|
claudeRequest.tools = tools;
|
|
366445
366498
|
}
|
|
366446
|
-
if (thinkingEnabled) {
|
|
366447
|
-
if (adaptiveThinkingEnabled) {
|
|
366448
|
-
claudeRequest.thinking = { type: "adaptive" };
|
|
366449
|
-
claudeRequest.output_config = {
|
|
366450
|
-
effort: reasoningOptions?.effort ?? reasoningEffort ?? "high"
|
|
366451
|
-
};
|
|
366452
|
-
} else if (legacyThinkingEnabled && reasoningOptions?.max_tokens) {
|
|
366453
|
-
claudeRequest.thinking = {
|
|
366454
|
-
type: "enabled",
|
|
366455
|
-
budget_tokens: reasoningOptions.max_tokens
|
|
366456
|
-
};
|
|
366457
|
-
}
|
|
366458
|
-
}
|
|
366459
366499
|
const leasedAttempt = beginLeasedProviderAttempt(
|
|
366460
366500
|
claudeRoute,
|
|
366461
366501
|
config2.bedrock.enabled ? configuredBedrockCircuitCredentialIdentity() : claudeApiKey,
|
|
@@ -393199,7 +393239,7 @@ function loadCliConfig(env2 = process.env) {
|
|
|
393199
393239
|
// Haiku is a good CLI default: fast, cheap, large context. Any model works
|
|
393200
393240
|
// now that the output-budget math accounts for the system prompt + tools
|
|
393201
393241
|
// (see calculateMaxOutputTokens). Override with DEFAULT_MODEL or `-m`.
|
|
393202
|
-
defaultModel: pick(env2.DEFAULT_MODEL, file2.defaultModel) || "anthropic/claude-haiku-
|
|
393242
|
+
defaultModel: pick(env2.DEFAULT_MODEL, file2.defaultModel) || "anthropic/claude-haiku-5.5",
|
|
393203
393243
|
maxSteps: 200,
|
|
393204
393244
|
provider: pick(env2.USABLE_PROVIDER, file2.provider) ?? void 0,
|
|
393205
393245
|
usableApiHost: pick(env2.USABLE_API_HOST, file2.usableApiHost),
|
|
@@ -393823,7 +393863,7 @@ init_tui_select();
|
|
|
393823
393863
|
init_model_registry();
|
|
393824
393864
|
|
|
393825
393865
|
// package.json
|
|
393826
|
-
var version2 = "1.
|
|
393866
|
+
var version2 = "1.216.0";
|
|
393827
393867
|
|
|
393828
393868
|
// src/adapters/cli/model-catalog.ts
|
|
393829
393869
|
init_codex_auth();
|
|
@@ -393901,7 +393941,7 @@ var PROVIDERS = [
|
|
|
393901
393941
|
label: "Usable subscription \u2014 uses your login, no API key (recommended)",
|
|
393902
393942
|
kind: "usable",
|
|
393903
393943
|
provider: "usable",
|
|
393904
|
-
defaultModel: "anthropic/claude-haiku-
|
|
393944
|
+
defaultModel: "anthropic/claude-haiku-5.5"
|
|
393905
393945
|
},
|
|
393906
393946
|
{
|
|
393907
393947
|
label: "OpenRouter \u2014 your API key, many models",
|
|
@@ -393918,7 +393958,7 @@ var PROVIDERS = [
|
|
|
393918
393958
|
provider: "anthropic",
|
|
393919
393959
|
keyField: "anthropic-api-key",
|
|
393920
393960
|
keyHint: "sk-ant-\u2026",
|
|
393921
|
-
defaultModel: "anthropic/claude-haiku-
|
|
393961
|
+
defaultModel: "anthropic/claude-haiku-5.5"
|
|
393922
393962
|
},
|
|
393923
393963
|
{
|
|
393924
393964
|
label: "OpenAI Codex \u2014 your ChatGPT subscription (sign in with ChatGPT)",
|