@letta-ai/letta-agent-sdk 0.7.8 → 0.8.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.
Files changed (63) hide show
  1. package/README.md +23 -0
  2. package/dist/agent-creation.d.ts +2 -1
  3. package/dist/agent-creation.d.ts.map +1 -1
  4. package/dist/app-server-management.d.ts +1 -0
  5. package/dist/app-server-management.d.ts.map +1 -1
  6. package/dist/app-server-session.d.ts.map +1 -1
  7. package/dist/client-base.d.ts +12 -0
  8. package/dist/client-base.d.ts.map +1 -1
  9. package/dist/client-entry.d.ts +1 -0
  10. package/dist/client-entry.d.ts.map +1 -1
  11. package/dist/client-entry.js +515 -2679
  12. package/dist/client-entry.js.map +17 -15
  13. package/dist/client.d.ts +4 -0
  14. package/dist/client.d.ts.map +1 -1
  15. package/dist/cloud-management.d.ts +3 -2
  16. package/dist/cloud-management.d.ts.map +1 -1
  17. package/dist/cloud-session.d.ts +4 -1
  18. package/dist/cloud-session.d.ts.map +1 -1
  19. package/dist/index.d.ts +6 -2
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +643 -2639
  22. package/dist/index.js.map +21 -18
  23. package/dist/management-types.d.ts +47 -1
  24. package/dist/management-types.d.ts.map +1 -1
  25. package/dist/management.d.ts +4 -2
  26. package/dist/management.d.ts.map +1 -1
  27. package/dist/query-types.d.ts +25 -0
  28. package/dist/query-types.d.ts.map +1 -0
  29. package/dist/query.d.ts +7 -0
  30. package/dist/query.d.ts.map +1 -0
  31. package/dist/remote-session-protocol.d.ts +11 -1
  32. package/dist/remote-session-protocol.d.ts.map +1 -1
  33. package/dist/remote-turn-coordinator.d.ts.map +1 -1
  34. package/dist/repository-types.d.ts +89 -0
  35. package/dist/repository-types.d.ts.map +1 -0
  36. package/dist/skill-loading.d.ts +84 -0
  37. package/dist/skill-loading.d.ts.map +1 -0
  38. package/dist/skill-node.d.ts +28 -0
  39. package/dist/skill-node.d.ts.map +1 -0
  40. package/dist/types.d.ts +17 -84
  41. package/dist/types.d.ts.map +1 -1
  42. package/package.json +2 -2
  43. package/src/agent-creation.ts +37 -1
  44. package/src/app-server-management.ts +8 -0
  45. package/src/app-server-session.ts +35 -2
  46. package/src/client-base.ts +138 -1
  47. package/src/client-entry.ts +1 -0
  48. package/src/client.ts +39 -0
  49. package/src/cloud-management.ts +60 -0
  50. package/src/cloud-session.ts +84 -16
  51. package/src/index.ts +18 -0
  52. package/src/local-app-server.ts +1 -1
  53. package/src/management-types.ts +58 -1
  54. package/src/management.ts +28 -1
  55. package/src/query-types.ts +40 -0
  56. package/src/query.ts +43 -0
  57. package/src/remote-client-session-core.ts +1 -1
  58. package/src/remote-session-protocol.ts +12 -1
  59. package/src/remote-turn-coordinator.ts +5 -1
  60. package/src/repository-types.ts +105 -0
  61. package/src/skill-loading.ts +194 -0
  62. package/src/skill-node.ts +139 -0
  63. package/src/types.ts +42 -100
package/dist/index.js CHANGED
@@ -16,8 +16,12 @@ var __toESM = (mod, isNodeMode, target) => {
16
16
  });
17
17
  return to;
18
18
  };
19
+ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
19
20
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
20
21
 
22
+ // node_modules/@letta-ai/letta-code/dist/agent-presets-agent-presets.js
23
+ var init_agent_presets_agent_presets = () => {};
24
+
21
25
  // node_modules/@letta-ai/letta-client/internal/tslib.mjs
22
26
  function __classPrivateFieldSet(receiver, state, value, kind, f) {
23
27
  if (kind === "m")
@@ -38,13 +42,13 @@ function __classPrivateFieldGet(receiver, state, kind, f) {
38
42
 
39
43
  // node_modules/@letta-ai/letta-client/internal/utils/uuid.mjs
40
44
  var uuid4 = function() {
41
- const { crypto } = globalThis;
42
- if (crypto?.randomUUID) {
43
- uuid4 = crypto.randomUUID.bind(crypto);
44
- return crypto.randomUUID();
45
+ const { crypto: crypto2 } = globalThis;
46
+ if (crypto2?.randomUUID) {
47
+ uuid4 = crypto2.randomUUID.bind(crypto2);
48
+ return crypto2.randomUUID();
45
49
  }
46
50
  const u8 = new Uint8Array(1);
47
- const randomByte = crypto ? () => crypto.getRandomValues(u8)[0] : () => Math.random() * 255 & 255;
51
+ const randomByte = crypto2 ? () => crypto2.getRandomValues(u8)[0] : () => Math.random() * 255 & 255;
48
52
  return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => (+c ^ randomByte() & 15 >> +c / 4).toString(16));
49
53
  };
50
54
 
@@ -3011,6 +3015,100 @@ class RepositoriesClient {
3011
3015
  }
3012
3016
  }
3013
3017
 
3018
+ // src/skill-loading.ts
3019
+ var SKILL_NAME_RE = /^[a-z0-9][a-z0-9._-]*$/;
3020
+ function assertValidSkillName(name) {
3021
+ if (!SKILL_NAME_RE.test(name)) {
3022
+ throw new Error(`Invalid skill name "${name}". Skill names are directory names: ` + `lowercase letters, digits, ".", "_", "-" (e.g. "generating-voice-memos").`);
3023
+ }
3024
+ }
3025
+ function parseSkillMarkdown(content) {
3026
+ if (!content.startsWith(`---
3027
+ `) && !content.startsWith(`---\r
3028
+ `)) {
3029
+ return { body: content };
3030
+ }
3031
+ const fence = /\r?\n---[ \t]*(\r?\n|$)/.exec(content.slice(3));
3032
+ if (!fence)
3033
+ return { body: content };
3034
+ const yamlStart = content.startsWith(`---\r
3035
+ `) ? 5 : 4;
3036
+ const yamlEnd = 3 + fence.index;
3037
+ const yamlText = content.slice(yamlStart, yamlEnd);
3038
+ const body = content.slice(yamlEnd + fence[0].length);
3039
+ const fields = {};
3040
+ const lines = yamlText.split(/\r?\n/);
3041
+ for (let i = 0;i < lines.length; i++) {
3042
+ const line = lines[i];
3043
+ if (!line || /^\s/.test(line))
3044
+ continue;
3045
+ const colon = line.indexOf(":");
3046
+ if (colon <= 0)
3047
+ continue;
3048
+ const key = line.slice(0, colon).trim();
3049
+ let value = line.slice(colon + 1).trim();
3050
+ if (value === ">" || value === ">-" || value === "|" || value === "|-") {
3051
+ const folded = [];
3052
+ let next = lines[i + 1];
3053
+ while (next !== undefined && (/^\s/.test(next) || next === "")) {
3054
+ i++;
3055
+ folded.push(next.trim());
3056
+ next = lines[i + 1];
3057
+ }
3058
+ value = folded.filter((part) => part.length > 0).join(" ");
3059
+ } else if (value.startsWith('"') && value.endsWith('"') && value.length >= 2 || value.startsWith("'") && value.endsWith("'") && value.length >= 2) {
3060
+ value = value.slice(1, -1);
3061
+ }
3062
+ fields[key] = value;
3063
+ }
3064
+ return { name: fields["name"], description: fields["description"], body };
3065
+ }
3066
+ async function resolveSkillItems(items, loadDirectory) {
3067
+ if (!items || items.length === 0)
3068
+ return [];
3069
+ const resolved = [];
3070
+ for (const item of items) {
3071
+ if (typeof item === "string") {
3072
+ if (!loadDirectory) {
3073
+ throw new Error(`Skill directory paths ("${item}") require a Node.js runtime. ` + "Pass an inline skill ({ name, description, instructions }) instead.");
3074
+ }
3075
+ resolved.push(await loadDirectory(item));
3076
+ } else {
3077
+ assertValidSkillName(item.name);
3078
+ if (!item.instructions || item.instructions.trim().length === 0) {
3079
+ throw new Error(`Skill "${item.name}" has empty instructions.`);
3080
+ }
3081
+ if (!item.description || item.description.trim().length === 0) {
3082
+ throw new Error(`Skill "${item.name}" has no description. ` + `The description is the skill's trigger text; it is required.`);
3083
+ }
3084
+ resolved.push(item);
3085
+ }
3086
+ }
3087
+ const seen = new Set;
3088
+ for (const skill of resolved) {
3089
+ if (seen.has(skill.name)) {
3090
+ throw new Error(`Duplicate skill name: "${skill.name}".`);
3091
+ }
3092
+ seen.add(skill.name);
3093
+ }
3094
+ return resolved;
3095
+ }
3096
+ function skillsHaveSupportFiles(skills) {
3097
+ return skills.some((skill) => skill.files && Object.keys(skill.files).length > 0);
3098
+ }
3099
+ function skillSupportFileEntries(skills) {
3100
+ const entries = [];
3101
+ for (const skill of skills) {
3102
+ for (const [relPath, data] of Object.entries(skill.files ?? {})) {
3103
+ if (relPath.split("/").some((part) => part === ".." || part === "")) {
3104
+ throw new Error(`Skill "${skill.name}" file path escapes the skill directory: ${relPath}`);
3105
+ }
3106
+ entries.push({ path: `skills/${skill.name}/${relPath}`, data });
3107
+ }
3108
+ }
3109
+ return entries;
3110
+ }
3111
+
3014
3112
  // src/agent-repositories.ts
3015
3113
  var DEFAULT_VISIBILITY_TIMEOUT_MS = 1e4;
3016
3114
  var DEFAULT_VISIBILITY_POLL_INTERVAL_MS = 100;
@@ -3553,6 +3651,9 @@ class AppServerManagementTransport {
3553
3651
  }
3554
3652
  return { messages: response.messages };
3555
3653
  }
3654
+ enqueueConversationMessage() {
3655
+ return Promise.reject(new Error(`conversations.enqueue() is only available with backend: "cloud". App-server backends deliver messages through a session's send().`));
3656
+ }
3556
3657
  async request(type, body, responseType) {
3557
3658
  if (this.closingConnections.size > 0) {
3558
3659
  await Promise.all([...this.closingConnections]);
@@ -3637,6 +3738,7 @@ async function closeConnection(connection) {
3637
3738
  }
3638
3739
 
3639
3740
  // node_modules/@letta-ai/letta-code/dist/agent-presets.js
3741
+ init_agent_presets_agent_presets();
3640
3742
  var LETTA_CODE_ORIGIN_TAG = "origin:letta-code";
3641
3743
  var LETTA_CODE_SUBAGENT_TAG = "role:subagent";
3642
3744
  var GIT_MEMORY_ENABLED_TAG = "git-memory-enabled";
@@ -5392,2586 +5494,154 @@ var SYSTEM_PROMPTS = [
5392
5494
  id: "source-claude",
5393
5495
  label: "Claude Code",
5394
5496
  description: "Source-faithful Claude Code prompt (for benchmarking)",
5395
- content: source_claude_default
5396
- },
5397
- {
5398
- id: "source-codex",
5399
- label: "Codex",
5400
- description: "Source-faithful OpenAI Codex prompt (for benchmarking)",
5401
- content: source_codex_default
5402
- },
5403
- {
5404
- id: "source-gemini",
5405
- label: "Gemini CLI",
5406
- description: "Source-faithful Gemini CLI prompt (for benchmarking)",
5407
- content: source_gemini_default
5408
- }
5409
- ];
5410
- function buildSystemPrompt(presetId, memoryMode) {
5411
- const preset = SYSTEM_PROMPTS.find((p) => p.id === presetId);
5412
- if (!preset) {
5413
- throw new Error(`Unknown preset "${presetId}" — cannot rebuild system prompt`);
5414
- }
5415
- if (memoryMode === "local-memfs") {
5416
- return (preset.localMemfsContent ?? preset.memfsContent ?? preset.content).trim();
5417
- }
5418
- if (memoryMode === "memfs") {
5419
- return (preset.memfsContent ?? preset.content).trim();
5420
- }
5421
- return preset.content.trim();
5422
- }
5423
- var MEMORY_BLOCK_LABELS = ["persona", "human"];
5424
- function parseMdxFrontmatter(content) {
5425
- const frontmatterRegex = /^---\n([\s\S]*?)\n---\n([\s\S]*)$/;
5426
- const match = content.match(frontmatterRegex);
5427
- if (!match || !match[1] || !match[2]) {
5428
- return { frontmatter: {}, body: content };
5429
- }
5430
- const frontmatterText = match[1];
5431
- const body = match[2];
5432
- const frontmatter = {};
5433
- for (const line of frontmatterText.split(`
5434
- `)) {
5435
- const colonIndex = line.indexOf(":");
5436
- if (colonIndex > 0) {
5437
- const key = line.slice(0, colonIndex).trim();
5438
- const value = line.slice(colonIndex + 1).trim();
5439
- frontmatter[key] = value;
5440
- }
5441
- }
5442
- return { frontmatter, body: body.trim() };
5443
- }
5444
- async function loadMemoryBlocksFromMdx() {
5445
- const memoryBlocks = [];
5446
- const mdxFiles = MEMORY_BLOCK_LABELS.map((label) => `${label}.mdx`);
5447
- for (const filename of mdxFiles) {
5448
- try {
5449
- const content = MEMORY_PROMPTS[filename];
5450
- if (!content) {
5451
- console.warn(`Missing embedded prompt file: ${filename}`);
5452
- continue;
5453
- }
5454
- const { frontmatter, body } = parseMdxFrontmatter(content);
5455
- const label = frontmatter.label || filename.replace(".mdx", "");
5456
- const block = {
5457
- label,
5458
- value: body
5459
- };
5460
- if (frontmatter.description) {
5461
- block.description = frontmatter.description;
5462
- }
5463
- if (READ_ONLY_BLOCK_LABELS.includes(label)) {
5464
- block.read_only = true;
5465
- }
5466
- memoryBlocks.push(block);
5467
- } catch (error) {
5468
- console.error(`Error loading ${filename}:`, error);
5469
- }
5470
- }
5471
- return memoryBlocks;
5472
- }
5473
- var cachedMemoryBlocks = null;
5474
- async function getDefaultMemoryBlocks() {
5475
- if (!cachedMemoryBlocks) {
5476
- cachedMemoryBlocks = await loadMemoryBlocksFromMdx();
5477
- }
5478
- return cachedMemoryBlocks;
5479
- }
5480
- var models_default = {
5481
- models: [
5482
- {
5483
- id: "auto",
5484
- isDefault: true,
5485
- handle: "letta/auto",
5486
- label: "Auto",
5487
- description: "Automatically select the best model",
5488
- free: true,
5489
- updateArgs: {
5490
- context_window: 140000,
5491
- max_output_tokens: 28000,
5492
- parallel_tool_calls: true
5493
- },
5494
- isFeatured: true
5495
- },
5496
- {
5497
- id: "auto-fast",
5498
- handle: "letta/auto-fast",
5499
- label: "Auto Fast",
5500
- description: "Automatically select the best fast model",
5501
- free: true,
5502
- updateArgs: {
5503
- context_window: 140000,
5504
- max_output_tokens: 28000,
5505
- parallel_tool_calls: true
5506
- },
5507
- isFeatured: true
5508
- },
5509
- {
5510
- id: "auto-chat",
5511
- handle: "letta/auto-chat",
5512
- label: "Auto Chat",
5513
- description: "Automatically select the best model for chat",
5514
- free: true,
5515
- updateArgs: {
5516
- context_window: 140000,
5517
- max_output_tokens: 28000,
5518
- parallel_tool_calls: true
5519
- },
5520
- isFeatured: true
5521
- },
5522
- {
5523
- id: "glm",
5524
- handle: "letta/glm",
5525
- label: "Letta GLM",
5526
- description: "Route directly to Letta-hosted GLM 5.2",
5527
- free: true,
5528
- updateArgs: {
5529
- context_window: 200000,
5530
- max_output_tokens: 28000,
5531
- parallel_tool_calls: true
5532
- },
5533
- isFeatured: true
5534
- },
5535
- {
5536
- id: "gpt-5.6-sol-none",
5537
- handle: "openai/gpt-5.6-sol",
5538
- label: "GPT-5.6 Sol",
5539
- description: "OpenAI's most capable GPT-5.6 model (no reasoning)",
5540
- updateArgs: {
5541
- reasoning_effort: "none",
5542
- verbosity: "medium",
5543
- context_window: 350000,
5544
- max_output_tokens: 128000,
5545
- parallel_tool_calls: true
5546
- }
5547
- },
5548
- {
5549
- id: "gpt-5.6-sol-low",
5550
- handle: "openai/gpt-5.6-sol",
5551
- label: "GPT-5.6 Sol",
5552
- description: "OpenAI's most capable GPT-5.6 model (low reasoning)",
5553
- updateArgs: {
5554
- reasoning_effort: "low",
5555
- verbosity: "medium",
5556
- context_window: 350000,
5557
- max_output_tokens: 128000,
5558
- parallel_tool_calls: true
5559
- }
5560
- },
5561
- {
5562
- id: "gpt-5.6-sol-medium",
5563
- handle: "openai/gpt-5.6-sol",
5564
- label: "GPT-5.6 Sol",
5565
- description: "OpenAI's most capable GPT-5.6 model (med reasoning)",
5566
- updateArgs: {
5567
- reasoning_effort: "medium",
5568
- verbosity: "medium",
5569
- context_window: 350000,
5570
- max_output_tokens: 128000,
5571
- parallel_tool_calls: true
5572
- }
5573
- },
5574
- {
5575
- id: "gpt-5.6-sol",
5576
- handle: "openai/gpt-5.6-sol",
5577
- label: "GPT-5.6 Sol",
5578
- description: "OpenAI's most capable GPT-5.6 model (high reasoning)",
5579
- isFeatured: true,
5580
- updateArgs: {
5581
- reasoning_effort: "high",
5582
- verbosity: "medium",
5583
- context_window: 350000,
5584
- max_output_tokens: 128000,
5585
- parallel_tool_calls: true
5586
- }
5587
- },
5588
- {
5589
- id: "gpt-5.6-sol-xhigh",
5590
- handle: "openai/gpt-5.6-sol",
5591
- label: "GPT-5.6 Sol",
5592
- description: "OpenAI's most capable GPT-5.6 model (extra-high reasoning)",
5593
- updateArgs: {
5594
- reasoning_effort: "xhigh",
5595
- verbosity: "medium",
5596
- context_window: 350000,
5597
- max_output_tokens: 128000,
5598
- parallel_tool_calls: true
5599
- }
5600
- },
5601
- {
5602
- id: "gpt-5.6-sol-max",
5603
- handle: "openai/gpt-5.6-sol",
5604
- label: "GPT-5.6 Sol",
5605
- description: "OpenAI's most capable GPT-5.6 model (max reasoning)",
5606
- updateArgs: {
5607
- reasoning_effort: "max",
5608
- verbosity: "medium",
5609
- context_window: 350000,
5610
- max_output_tokens: 128000,
5611
- parallel_tool_calls: true
5612
- }
5613
- },
5614
- {
5615
- id: "gpt-5.6-sol-1m-none",
5616
- handle: "openai/gpt-5.6-sol",
5617
- label: "GPT-5.6 Sol 1M",
5618
- description: "GPT-5.6 Sol 1M (no reasoning)",
5619
- updateArgs: {
5620
- reasoning_effort: "none",
5621
- verbosity: "medium",
5622
- context_window: 1050000,
5623
- max_output_tokens: 128000,
5624
- parallel_tool_calls: true
5625
- }
5626
- },
5627
- {
5628
- id: "gpt-5.6-sol-1m-low",
5629
- handle: "openai/gpt-5.6-sol",
5630
- label: "GPT-5.6 Sol 1M",
5631
- description: "GPT-5.6 Sol 1M (low reasoning)",
5632
- updateArgs: {
5633
- reasoning_effort: "low",
5634
- verbosity: "medium",
5635
- context_window: 1050000,
5636
- max_output_tokens: 128000,
5637
- parallel_tool_calls: true
5638
- }
5639
- },
5640
- {
5641
- id: "gpt-5.6-sol-1m-medium",
5642
- handle: "openai/gpt-5.6-sol",
5643
- label: "GPT-5.6 Sol 1M",
5644
- description: "GPT-5.6 Sol 1M (med reasoning)",
5645
- updateArgs: {
5646
- reasoning_effort: "medium",
5647
- verbosity: "medium",
5648
- context_window: 1050000,
5649
- max_output_tokens: 128000,
5650
- parallel_tool_calls: true
5651
- }
5652
- },
5653
- {
5654
- id: "gpt-5.6-sol-1m",
5655
- handle: "openai/gpt-5.6-sol",
5656
- label: "GPT-5.6 Sol 1M",
5657
- description: "GPT-5.6 Sol with 1M token context window (high reasoning)",
5658
- updateArgs: {
5659
- reasoning_effort: "high",
5660
- verbosity: "medium",
5661
- context_window: 1050000,
5662
- max_output_tokens: 128000,
5663
- parallel_tool_calls: true
5664
- }
5665
- },
5666
- {
5667
- id: "gpt-5.6-sol-1m-xhigh",
5668
- handle: "openai/gpt-5.6-sol",
5669
- label: "GPT-5.6 Sol 1M",
5670
- description: "GPT-5.6 Sol 1M (extra-high reasoning)",
5671
- updateArgs: {
5672
- reasoning_effort: "xhigh",
5673
- verbosity: "medium",
5674
- context_window: 1050000,
5675
- max_output_tokens: 128000,
5676
- parallel_tool_calls: true
5677
- }
5678
- },
5679
- {
5680
- id: "gpt-5.6-sol-1m-max",
5681
- handle: "openai/gpt-5.6-sol",
5682
- label: "GPT-5.6 Sol 1M",
5683
- description: "GPT-5.6 Sol 1M (max reasoning)",
5684
- updateArgs: {
5685
- reasoning_effort: "max",
5686
- verbosity: "medium",
5687
- context_window: 1050000,
5688
- max_output_tokens: 128000,
5689
- parallel_tool_calls: true
5690
- }
5691
- },
5692
- {
5693
- id: "gpt-5.6-terra-none",
5694
- handle: "openai/gpt-5.6-terra",
5695
- label: "GPT-5.6 Terra",
5696
- description: "GPT-5.6 Terra (no reasoning)",
5697
- updateArgs: {
5698
- reasoning_effort: "none",
5699
- verbosity: "medium",
5700
- context_window: 350000,
5701
- max_output_tokens: 128000,
5702
- parallel_tool_calls: true
5703
- }
5704
- },
5705
- {
5706
- id: "gpt-5.6-terra-low",
5707
- handle: "openai/gpt-5.6-terra",
5708
- label: "GPT-5.6 Terra",
5709
- description: "GPT-5.6 Terra (low reasoning)",
5710
- updateArgs: {
5711
- reasoning_effort: "low",
5712
- verbosity: "medium",
5713
- context_window: 350000,
5714
- max_output_tokens: 128000,
5715
- parallel_tool_calls: true
5716
- }
5717
- },
5718
- {
5719
- id: "gpt-5.6-terra-medium",
5720
- handle: "openai/gpt-5.6-terra",
5721
- label: "GPT-5.6 Terra",
5722
- description: "GPT-5.6 Terra (med reasoning)",
5723
- updateArgs: {
5724
- reasoning_effort: "medium",
5725
- verbosity: "medium",
5726
- context_window: 350000,
5727
- max_output_tokens: 128000,
5728
- parallel_tool_calls: true
5729
- }
5730
- },
5731
- {
5732
- id: "gpt-5.6-terra",
5733
- handle: "openai/gpt-5.6-terra",
5734
- label: "GPT-5.6 Terra",
5735
- description: "GPT-5.6 Terra (high reasoning)",
5736
- isFeatured: true,
5737
- updateArgs: {
5738
- reasoning_effort: "high",
5739
- verbosity: "medium",
5740
- context_window: 350000,
5741
- max_output_tokens: 128000,
5742
- parallel_tool_calls: true
5743
- }
5744
- },
5745
- {
5746
- id: "gpt-5.6-terra-xhigh",
5747
- handle: "openai/gpt-5.6-terra",
5748
- label: "GPT-5.6 Terra",
5749
- description: "GPT-5.6 Terra (extra-high reasoning)",
5750
- updateArgs: {
5751
- reasoning_effort: "xhigh",
5752
- verbosity: "medium",
5753
- context_window: 350000,
5754
- max_output_tokens: 128000,
5755
- parallel_tool_calls: true
5756
- }
5757
- },
5758
- {
5759
- id: "gpt-5.6-terra-max",
5760
- handle: "openai/gpt-5.6-terra",
5761
- label: "GPT-5.6 Terra",
5762
- description: "GPT-5.6 Terra (max reasoning)",
5763
- updateArgs: {
5764
- reasoning_effort: "max",
5765
- verbosity: "medium",
5766
- context_window: 350000,
5767
- max_output_tokens: 128000,
5768
- parallel_tool_calls: true
5769
- }
5770
- },
5771
- {
5772
- id: "gpt-5.6-terra-1m-none",
5773
- handle: "openai/gpt-5.6-terra",
5774
- label: "GPT-5.6 Terra 1M",
5775
- description: "GPT-5.6 Terra 1M (no reasoning)",
5776
- updateArgs: {
5777
- reasoning_effort: "none",
5778
- verbosity: "medium",
5779
- context_window: 1050000,
5780
- max_output_tokens: 128000,
5781
- parallel_tool_calls: true
5782
- }
5783
- },
5784
- {
5785
- id: "gpt-5.6-terra-1m-low",
5786
- handle: "openai/gpt-5.6-terra",
5787
- label: "GPT-5.6 Terra 1M",
5788
- description: "GPT-5.6 Terra 1M (low reasoning)",
5789
- updateArgs: {
5790
- reasoning_effort: "low",
5791
- verbosity: "medium",
5792
- context_window: 1050000,
5793
- max_output_tokens: 128000,
5794
- parallel_tool_calls: true
5795
- }
5796
- },
5797
- {
5798
- id: "gpt-5.6-terra-1m-medium",
5799
- handle: "openai/gpt-5.6-terra",
5800
- label: "GPT-5.6 Terra 1M",
5801
- description: "GPT-5.6 Terra 1M (med reasoning)",
5802
- updateArgs: {
5803
- reasoning_effort: "medium",
5804
- verbosity: "medium",
5805
- context_window: 1050000,
5806
- max_output_tokens: 128000,
5807
- parallel_tool_calls: true
5808
- }
5809
- },
5810
- {
5811
- id: "gpt-5.6-terra-1m",
5812
- handle: "openai/gpt-5.6-terra",
5813
- label: "GPT-5.6 Terra 1M",
5814
- description: "GPT-5.6 Terra with 1M token context window (high reasoning)",
5815
- updateArgs: {
5816
- reasoning_effort: "high",
5817
- verbosity: "medium",
5818
- context_window: 1050000,
5819
- max_output_tokens: 128000,
5820
- parallel_tool_calls: true
5821
- }
5822
- },
5823
- {
5824
- id: "gpt-5.6-terra-1m-xhigh",
5825
- handle: "openai/gpt-5.6-terra",
5826
- label: "GPT-5.6 Terra 1M",
5827
- description: "GPT-5.6 Terra 1M (extra-high reasoning)",
5828
- updateArgs: {
5829
- reasoning_effort: "xhigh",
5830
- verbosity: "medium",
5831
- context_window: 1050000,
5832
- max_output_tokens: 128000,
5833
- parallel_tool_calls: true
5834
- }
5835
- },
5836
- {
5837
- id: "gpt-5.6-terra-1m-max",
5838
- handle: "openai/gpt-5.6-terra",
5839
- label: "GPT-5.6 Terra 1M",
5840
- description: "GPT-5.6 Terra 1M (max reasoning)",
5841
- updateArgs: {
5842
- reasoning_effort: "max",
5843
- verbosity: "medium",
5844
- context_window: 1050000,
5845
- max_output_tokens: 128000,
5846
- parallel_tool_calls: true
5847
- }
5848
- },
5849
- {
5850
- id: "gpt-5.6-luna-none",
5851
- handle: "openai/gpt-5.6-luna",
5852
- label: "GPT-5.6 Luna",
5853
- description: "GPT-5.6 Luna (no reasoning)",
5854
- updateArgs: {
5855
- reasoning_effort: "none",
5856
- verbosity: "medium",
5857
- context_window: 350000,
5858
- max_output_tokens: 128000,
5859
- parallel_tool_calls: true
5860
- }
5861
- },
5862
- {
5863
- id: "gpt-5.6-luna-low",
5864
- handle: "openai/gpt-5.6-luna",
5865
- label: "GPT-5.6 Luna",
5866
- description: "GPT-5.6 Luna (low reasoning)",
5867
- updateArgs: {
5868
- reasoning_effort: "low",
5869
- verbosity: "medium",
5870
- context_window: 350000,
5871
- max_output_tokens: 128000,
5872
- parallel_tool_calls: true
5873
- }
5874
- },
5875
- {
5876
- id: "gpt-5.6-luna-medium",
5877
- handle: "openai/gpt-5.6-luna",
5878
- label: "GPT-5.6 Luna",
5879
- description: "GPT-5.6 Luna (med reasoning)",
5880
- updateArgs: {
5881
- reasoning_effort: "medium",
5882
- verbosity: "medium",
5883
- context_window: 350000,
5884
- max_output_tokens: 128000,
5885
- parallel_tool_calls: true
5886
- }
5887
- },
5888
- {
5889
- id: "gpt-5.6-luna",
5890
- handle: "openai/gpt-5.6-luna",
5891
- label: "GPT-5.6 Luna",
5892
- description: "GPT-5.6 Luna (high reasoning)",
5893
- isFeatured: true,
5894
- updateArgs: {
5895
- reasoning_effort: "high",
5896
- verbosity: "medium",
5897
- context_window: 350000,
5898
- max_output_tokens: 128000,
5899
- parallel_tool_calls: true
5900
- }
5901
- },
5902
- {
5903
- id: "gpt-5.6-luna-xhigh",
5904
- handle: "openai/gpt-5.6-luna",
5905
- label: "GPT-5.6 Luna",
5906
- description: "GPT-5.6 Luna (extra-high reasoning)",
5907
- updateArgs: {
5908
- reasoning_effort: "xhigh",
5909
- verbosity: "medium",
5910
- context_window: 350000,
5911
- max_output_tokens: 128000,
5912
- parallel_tool_calls: true
5913
- }
5914
- },
5915
- {
5916
- id: "gpt-5.6-luna-max",
5917
- handle: "openai/gpt-5.6-luna",
5918
- label: "GPT-5.6 Luna",
5919
- description: "GPT-5.6 Luna (max reasoning)",
5920
- updateArgs: {
5921
- reasoning_effort: "max",
5922
- verbosity: "medium",
5923
- context_window: 350000,
5924
- max_output_tokens: 128000,
5925
- parallel_tool_calls: true
5926
- }
5927
- },
5928
- {
5929
- id: "gpt-5.6-luna-1m-none",
5930
- handle: "openai/gpt-5.6-luna",
5931
- label: "GPT-5.6 Luna 1M",
5932
- description: "GPT-5.6 Luna 1M (no reasoning)",
5933
- updateArgs: {
5934
- reasoning_effort: "none",
5935
- verbosity: "medium",
5936
- context_window: 1050000,
5937
- max_output_tokens: 128000,
5938
- parallel_tool_calls: true
5939
- }
5940
- },
5941
- {
5942
- id: "gpt-5.6-luna-1m-low",
5943
- handle: "openai/gpt-5.6-luna",
5944
- label: "GPT-5.6 Luna 1M",
5945
- description: "GPT-5.6 Luna 1M (low reasoning)",
5946
- updateArgs: {
5947
- reasoning_effort: "low",
5948
- verbosity: "medium",
5949
- context_window: 1050000,
5950
- max_output_tokens: 128000,
5951
- parallel_tool_calls: true
5952
- }
5953
- },
5954
- {
5955
- id: "gpt-5.6-luna-1m-medium",
5956
- handle: "openai/gpt-5.6-luna",
5957
- label: "GPT-5.6 Luna 1M",
5958
- description: "GPT-5.6 Luna 1M (med reasoning)",
5959
- updateArgs: {
5960
- reasoning_effort: "medium",
5961
- verbosity: "medium",
5962
- context_window: 1050000,
5963
- max_output_tokens: 128000,
5964
- parallel_tool_calls: true
5965
- }
5966
- },
5967
- {
5968
- id: "gpt-5.6-luna-1m",
5969
- handle: "openai/gpt-5.6-luna",
5970
- label: "GPT-5.6 Luna 1M",
5971
- description: "GPT-5.6 Luna with 1M token context window (high reasoning)",
5972
- updateArgs: {
5973
- reasoning_effort: "high",
5974
- verbosity: "medium",
5975
- context_window: 1050000,
5976
- max_output_tokens: 128000,
5977
- parallel_tool_calls: true
5978
- }
5979
- },
5980
- {
5981
- id: "gpt-5.6-luna-1m-xhigh",
5982
- handle: "openai/gpt-5.6-luna",
5983
- label: "GPT-5.6 Luna 1M",
5984
- description: "GPT-5.6 Luna 1M (extra-high reasoning)",
5985
- updateArgs: {
5986
- reasoning_effort: "xhigh",
5987
- verbosity: "medium",
5988
- context_window: 1050000,
5989
- max_output_tokens: 128000,
5990
- parallel_tool_calls: true
5991
- }
5992
- },
5993
- {
5994
- id: "gpt-5.6-luna-1m-max",
5995
- handle: "openai/gpt-5.6-luna",
5996
- label: "GPT-5.6 Luna 1M",
5997
- description: "GPT-5.6 Luna 1M (max reasoning)",
5998
- updateArgs: {
5999
- reasoning_effort: "max",
6000
- verbosity: "medium",
6001
- context_window: 1050000,
6002
- max_output_tokens: 128000,
6003
- parallel_tool_calls: true
6004
- }
6005
- },
6006
- {
6007
- id: "gpt-5.6-sol-plus-pro-none",
6008
- handle: "chatgpt-plus-pro/gpt-5.6-sol",
6009
- label: "GPT-5.6 Sol (ChatGPT)",
6010
- description: "GPT-5.6 Sol (no reasoning) via ChatGPT Plus/Pro",
6011
- updateArgs: {
6012
- reasoning_effort: "none",
6013
- verbosity: "low",
6014
- context_window: 350000,
6015
- max_output_tokens: 128000,
6016
- parallel_tool_calls: true
6017
- }
6018
- },
6019
- {
6020
- id: "gpt-5.6-sol-plus-pro-low",
6021
- handle: "chatgpt-plus-pro/gpt-5.6-sol",
6022
- label: "GPT-5.6 Sol (ChatGPT)",
6023
- description: "GPT-5.6 Sol (low reasoning) via ChatGPT Plus/Pro",
6024
- updateArgs: {
6025
- reasoning_effort: "low",
6026
- verbosity: "low",
6027
- context_window: 350000,
6028
- max_output_tokens: 128000,
6029
- parallel_tool_calls: true
6030
- }
6031
- },
6032
- {
6033
- id: "gpt-5.6-sol-plus-pro-medium",
6034
- handle: "chatgpt-plus-pro/gpt-5.6-sol",
6035
- label: "GPT-5.6 Sol (ChatGPT)",
6036
- description: "GPT-5.6 Sol (med reasoning) via ChatGPT Plus/Pro",
6037
- updateArgs: {
6038
- reasoning_effort: "medium",
6039
- verbosity: "low",
6040
- context_window: 350000,
6041
- max_output_tokens: 128000,
6042
- parallel_tool_calls: true
6043
- }
6044
- },
6045
- {
6046
- id: "gpt-5.6-sol-plus-pro-high",
6047
- handle: "chatgpt-plus-pro/gpt-5.6-sol",
6048
- label: "GPT-5.6 Sol (ChatGPT)",
6049
- description: "GPT-5.6 Sol (high reasoning) via ChatGPT Plus/Pro",
6050
- updateArgs: {
6051
- reasoning_effort: "high",
6052
- verbosity: "low",
6053
- context_window: 350000,
6054
- max_output_tokens: 128000,
6055
- parallel_tool_calls: true
6056
- },
6057
- isFeatured: true
6058
- },
6059
- {
6060
- id: "gpt-5.6-sol-plus-pro-xhigh",
6061
- handle: "chatgpt-plus-pro/gpt-5.6-sol",
6062
- label: "GPT-5.6 Sol (ChatGPT)",
6063
- description: "GPT-5.6 Sol (extra-high reasoning) via ChatGPT Plus/Pro",
6064
- updateArgs: {
6065
- reasoning_effort: "xhigh",
6066
- verbosity: "low",
6067
- context_window: 350000,
6068
- max_output_tokens: 128000,
6069
- parallel_tool_calls: true
6070
- }
6071
- },
6072
- {
6073
- id: "gpt-5.6-sol-plus-pro-max",
6074
- handle: "chatgpt-plus-pro/gpt-5.6-sol",
6075
- label: "GPT-5.6 Sol (ChatGPT)",
6076
- description: "GPT-5.6 Sol (max reasoning) via ChatGPT Plus/Pro",
6077
- updateArgs: {
6078
- reasoning_effort: "max",
6079
- verbosity: "low",
6080
- context_window: 350000,
6081
- max_output_tokens: 128000,
6082
- parallel_tool_calls: true
6083
- }
6084
- },
6085
- {
6086
- id: "gpt-5.6-terra-plus-pro-none",
6087
- handle: "chatgpt-plus-pro/gpt-5.6-terra",
6088
- label: "GPT-5.6 Terra (ChatGPT)",
6089
- description: "GPT-5.6 Terra (no reasoning) via ChatGPT Plus/Pro",
6090
- updateArgs: {
6091
- reasoning_effort: "none",
6092
- verbosity: "low",
6093
- context_window: 350000,
6094
- max_output_tokens: 128000,
6095
- parallel_tool_calls: true
6096
- }
6097
- },
6098
- {
6099
- id: "gpt-5.6-terra-plus-pro-low",
6100
- handle: "chatgpt-plus-pro/gpt-5.6-terra",
6101
- label: "GPT-5.6 Terra (ChatGPT)",
6102
- description: "GPT-5.6 Terra (low reasoning) via ChatGPT Plus/Pro",
6103
- updateArgs: {
6104
- reasoning_effort: "low",
6105
- verbosity: "low",
6106
- context_window: 350000,
6107
- max_output_tokens: 128000,
6108
- parallel_tool_calls: true
6109
- }
6110
- },
6111
- {
6112
- id: "gpt-5.6-terra-plus-pro-medium",
6113
- handle: "chatgpt-plus-pro/gpt-5.6-terra",
6114
- label: "GPT-5.6 Terra (ChatGPT)",
6115
- description: "GPT-5.6 Terra (med reasoning) via ChatGPT Plus/Pro",
6116
- updateArgs: {
6117
- reasoning_effort: "medium",
6118
- verbosity: "low",
6119
- context_window: 350000,
6120
- max_output_tokens: 128000,
6121
- parallel_tool_calls: true
6122
- }
6123
- },
6124
- {
6125
- id: "gpt-5.6-terra-plus-pro-high",
6126
- handle: "chatgpt-plus-pro/gpt-5.6-terra",
6127
- label: "GPT-5.6 Terra (ChatGPT)",
6128
- description: "GPT-5.6 Terra (high reasoning) via ChatGPT Plus/Pro",
6129
- updateArgs: {
6130
- reasoning_effort: "high",
6131
- verbosity: "low",
6132
- context_window: 350000,
6133
- max_output_tokens: 128000,
6134
- parallel_tool_calls: true
6135
- },
6136
- isFeatured: true
6137
- },
6138
- {
6139
- id: "gpt-5.6-terra-plus-pro-xhigh",
6140
- handle: "chatgpt-plus-pro/gpt-5.6-terra",
6141
- label: "GPT-5.6 Terra (ChatGPT)",
6142
- description: "GPT-5.6 Terra (extra-high reasoning) via ChatGPT Plus/Pro",
6143
- updateArgs: {
6144
- reasoning_effort: "xhigh",
6145
- verbosity: "low",
6146
- context_window: 350000,
6147
- max_output_tokens: 128000,
6148
- parallel_tool_calls: true
6149
- }
6150
- },
6151
- {
6152
- id: "gpt-5.6-terra-plus-pro-max",
6153
- handle: "chatgpt-plus-pro/gpt-5.6-terra",
6154
- label: "GPT-5.6 Terra (ChatGPT)",
6155
- description: "GPT-5.6 Terra (max reasoning) via ChatGPT Plus/Pro",
6156
- updateArgs: {
6157
- reasoning_effort: "max",
6158
- verbosity: "low",
6159
- context_window: 350000,
6160
- max_output_tokens: 128000,
6161
- parallel_tool_calls: true
6162
- }
6163
- },
6164
- {
6165
- id: "gpt-5.6-luna-plus-pro-none",
6166
- handle: "chatgpt-plus-pro/gpt-5.6-luna",
6167
- label: "GPT-5.6 Luna (ChatGPT)",
6168
- description: "GPT-5.6 Luna (no reasoning) via ChatGPT Plus/Pro",
6169
- updateArgs: {
6170
- reasoning_effort: "none",
6171
- verbosity: "low",
6172
- context_window: 350000,
6173
- max_output_tokens: 128000,
6174
- parallel_tool_calls: true
6175
- }
6176
- },
6177
- {
6178
- id: "gpt-5.6-luna-plus-pro-low",
6179
- handle: "chatgpt-plus-pro/gpt-5.6-luna",
6180
- label: "GPT-5.6 Luna (ChatGPT)",
6181
- description: "GPT-5.6 Luna (low reasoning) via ChatGPT Plus/Pro",
6182
- updateArgs: {
6183
- reasoning_effort: "low",
6184
- verbosity: "low",
6185
- context_window: 350000,
6186
- max_output_tokens: 128000,
6187
- parallel_tool_calls: true
6188
- }
6189
- },
6190
- {
6191
- id: "gpt-5.6-luna-plus-pro-medium",
6192
- handle: "chatgpt-plus-pro/gpt-5.6-luna",
6193
- label: "GPT-5.6 Luna (ChatGPT)",
6194
- description: "GPT-5.6 Luna (med reasoning) via ChatGPT Plus/Pro",
6195
- updateArgs: {
6196
- reasoning_effort: "medium",
6197
- verbosity: "low",
6198
- context_window: 350000,
6199
- max_output_tokens: 128000,
6200
- parallel_tool_calls: true
6201
- }
6202
- },
6203
- {
6204
- id: "gpt-5.6-luna-plus-pro-high",
6205
- handle: "chatgpt-plus-pro/gpt-5.6-luna",
6206
- label: "GPT-5.6 Luna (ChatGPT)",
6207
- description: "GPT-5.6 Luna (high reasoning) via ChatGPT Plus/Pro",
6208
- updateArgs: {
6209
- reasoning_effort: "high",
6210
- verbosity: "low",
6211
- context_window: 350000,
6212
- max_output_tokens: 128000,
6213
- parallel_tool_calls: true
6214
- },
6215
- isFeatured: true
6216
- },
6217
- {
6218
- id: "gpt-5.6-luna-plus-pro-xhigh",
6219
- handle: "chatgpt-plus-pro/gpt-5.6-luna",
6220
- label: "GPT-5.6 Luna (ChatGPT)",
6221
- description: "GPT-5.6 Luna (extra-high reasoning) via ChatGPT Plus/Pro",
6222
- updateArgs: {
6223
- reasoning_effort: "xhigh",
6224
- verbosity: "low",
6225
- context_window: 350000,
6226
- max_output_tokens: 128000,
6227
- parallel_tool_calls: true
6228
- }
6229
- },
6230
- {
6231
- id: "gpt-5.6-luna-plus-pro-max",
6232
- handle: "chatgpt-plus-pro/gpt-5.6-luna",
6233
- label: "GPT-5.6 Luna (ChatGPT)",
6234
- description: "GPT-5.6 Luna (max reasoning) via ChatGPT Plus/Pro",
6235
- updateArgs: {
6236
- reasoning_effort: "max",
6237
- verbosity: "low",
6238
- context_window: 350000,
6239
- max_output_tokens: 128000,
6240
- parallel_tool_calls: true
6241
- }
6242
- },
6243
- {
6244
- id: "fable",
6245
- handle: "anthropic/claude-fable-5",
6246
- label: "Fable 5",
6247
- description: "Fable 5 (high reasoning)",
6248
- isFeatured: true,
6249
- updateArgs: {
6250
- context_window: 200000,
6251
- max_output_tokens: 128000,
6252
- enable_reasoner: true,
6253
- reasoning_effort: "high",
6254
- parallel_tool_calls: true
6255
- }
6256
- },
6257
- {
6258
- id: "fable-low",
6259
- handle: "anthropic/claude-fable-5",
6260
- label: "Fable 5",
6261
- description: "Fable 5 (low reasoning)",
6262
- updateArgs: {
6263
- context_window: 200000,
6264
- max_output_tokens: 128000,
6265
- enable_reasoner: true,
6266
- reasoning_effort: "low",
6267
- max_reasoning_tokens: 4000,
6268
- parallel_tool_calls: true
6269
- }
6270
- },
6271
- {
6272
- id: "fable-medium",
6273
- handle: "anthropic/claude-fable-5",
6274
- label: "Fable 5",
6275
- description: "Fable 5 (med reasoning)",
6276
- updateArgs: {
6277
- context_window: 200000,
6278
- max_output_tokens: 128000,
6279
- enable_reasoner: true,
6280
- reasoning_effort: "medium",
6281
- max_reasoning_tokens: 12000,
6282
- parallel_tool_calls: true
6283
- }
6284
- },
6285
- {
6286
- id: "fable-xhigh",
6287
- handle: "anthropic/claude-fable-5",
6288
- label: "Fable 5",
6289
- description: "Fable 5 (extra-high reasoning)",
6290
- updateArgs: {
6291
- context_window: 200000,
6292
- max_output_tokens: 128000,
6293
- enable_reasoner: true,
6294
- reasoning_effort: "xhigh",
6295
- parallel_tool_calls: true
6296
- }
6297
- },
6298
- {
6299
- id: "fable-max",
6300
- handle: "anthropic/claude-fable-5",
6301
- label: "Fable 5",
6302
- description: "Fable 5 (max reasoning)",
6303
- updateArgs: {
6304
- context_window: 200000,
6305
- max_output_tokens: 128000,
6306
- enable_reasoner: true,
6307
- reasoning_effort: "max",
6308
- parallel_tool_calls: true
6309
- }
6310
- },
6311
- {
6312
- id: "fable-1m",
6313
- handle: "anthropic/claude-fable-5",
6314
- label: "Fable 5 1M",
6315
- description: "Claude Fable 5 with 1M token context window (high reasoning)",
6316
- updateArgs: {
6317
- context_window: 950000,
6318
- max_output_tokens: 128000,
6319
- enable_reasoner: true,
6320
- reasoning_effort: "high",
6321
- parallel_tool_calls: true
6322
- }
6323
- },
6324
- {
6325
- id: "fable-1m-low",
6326
- handle: "anthropic/claude-fable-5",
6327
- label: "Fable 5 1M",
6328
- description: "Fable 5 1M (low reasoning)",
6329
- updateArgs: {
6330
- context_window: 950000,
6331
- max_output_tokens: 128000,
6332
- enable_reasoner: true,
6333
- reasoning_effort: "low",
6334
- max_reasoning_tokens: 4000,
6335
- parallel_tool_calls: true
6336
- }
6337
- },
6338
- {
6339
- id: "fable-1m-medium",
6340
- handle: "anthropic/claude-fable-5",
6341
- label: "Fable 5 1M",
6342
- description: "Fable 5 1M (med reasoning)",
6343
- updateArgs: {
6344
- context_window: 950000,
6345
- max_output_tokens: 128000,
6346
- enable_reasoner: true,
6347
- reasoning_effort: "medium",
6348
- max_reasoning_tokens: 12000,
6349
- parallel_tool_calls: true
6350
- }
6351
- },
6352
- {
6353
- id: "fable-1m-xhigh",
6354
- handle: "anthropic/claude-fable-5",
6355
- label: "Fable 5 1M",
6356
- description: "Fable 5 1M (extra-high reasoning)",
6357
- updateArgs: {
6358
- context_window: 950000,
6359
- max_output_tokens: 128000,
6360
- enable_reasoner: true,
6361
- reasoning_effort: "xhigh",
6362
- parallel_tool_calls: true
6363
- }
6364
- },
6365
- {
6366
- id: "fable-1m-max",
6367
- handle: "anthropic/claude-fable-5",
6368
- label: "Fable 5 1M",
6369
- description: "Fable 5 1M (max reasoning)",
6370
- updateArgs: {
6371
- context_window: 950000,
6372
- max_output_tokens: 128000,
6373
- enable_reasoner: true,
6374
- reasoning_effort: "max",
6375
- parallel_tool_calls: true
6376
- }
6377
- },
6378
- {
6379
- id: "opus-5",
6380
- handle: "anthropic/claude-opus-5",
6381
- label: "Opus 5",
6382
- description: "Opus 5 (high reasoning)",
6383
- updateArgs: {
6384
- context_window: 200000,
6385
- max_output_tokens: 128000,
6386
- enable_reasoner: true,
6387
- reasoning_effort: "high",
6388
- parallel_tool_calls: true
6389
- }
6390
- },
6391
- {
6392
- id: "opus-5-low",
6393
- handle: "anthropic/claude-opus-5",
6394
- label: "Opus 5",
6395
- description: "Opus 5 (low reasoning)",
6396
- updateArgs: {
6397
- context_window: 200000,
6398
- max_output_tokens: 128000,
6399
- enable_reasoner: true,
6400
- reasoning_effort: "low",
6401
- max_reasoning_tokens: 4000,
6402
- parallel_tool_calls: true
6403
- }
6404
- },
6405
- {
6406
- id: "opus-5-medium",
6407
- handle: "anthropic/claude-opus-5",
6408
- label: "Opus 5",
6409
- description: "Opus 5 (med reasoning)",
6410
- updateArgs: {
6411
- context_window: 200000,
6412
- max_output_tokens: 128000,
6413
- enable_reasoner: true,
6414
- reasoning_effort: "medium",
6415
- max_reasoning_tokens: 12000,
6416
- parallel_tool_calls: true
6417
- }
6418
- },
6419
- {
6420
- id: "opus-5-xhigh",
6421
- handle: "anthropic/claude-opus-5",
6422
- label: "Opus 5",
6423
- description: "Opus 5 (extra-high reasoning)",
6424
- updateArgs: {
6425
- context_window: 200000,
6426
- max_output_tokens: 128000,
6427
- enable_reasoner: true,
6428
- reasoning_effort: "xhigh",
6429
- parallel_tool_calls: true
6430
- }
6431
- },
6432
- {
6433
- id: "opus-5-max",
6434
- handle: "anthropic/claude-opus-5",
6435
- label: "Opus 5",
6436
- description: "Opus 5 (max reasoning)",
6437
- updateArgs: {
6438
- context_window: 200000,
6439
- max_output_tokens: 128000,
6440
- enable_reasoner: true,
6441
- reasoning_effort: "max",
6442
- parallel_tool_calls: true
6443
- }
6444
- },
6445
- {
6446
- id: "opus",
6447
- handle: "anthropic/claude-opus-4-8",
6448
- label: "Opus 4.8",
6449
- description: "Opus 4.8 (high reasoning)",
6450
- isFeatured: true,
6451
- updateArgs: {
6452
- context_window: 200000,
6453
- max_output_tokens: 128000,
6454
- reasoning_effort: "high",
6455
- enable_reasoner: true,
6456
- parallel_tool_calls: true
6457
- }
6458
- },
6459
- {
6460
- id: "opus-4.8-low",
6461
- handle: "anthropic/claude-opus-4-8",
6462
- label: "Opus 4.8",
6463
- description: "Opus 4.8 (low reasoning)",
6464
- updateArgs: {
6465
- context_window: 200000,
6466
- max_output_tokens: 128000,
6467
- reasoning_effort: "low",
6468
- enable_reasoner: true,
6469
- max_reasoning_tokens: 4000,
6470
- parallel_tool_calls: true
6471
- }
6472
- },
6473
- {
6474
- id: "opus-4.8-medium",
6475
- handle: "anthropic/claude-opus-4-8",
6476
- label: "Opus 4.8",
6477
- description: "Opus 4.8 (med reasoning)",
6478
- updateArgs: {
6479
- context_window: 200000,
6480
- max_output_tokens: 128000,
6481
- reasoning_effort: "medium",
6482
- enable_reasoner: true,
6483
- max_reasoning_tokens: 12000,
6484
- parallel_tool_calls: true
6485
- }
6486
- },
6487
- {
6488
- id: "opus-4.8-high",
6489
- handle: "anthropic/claude-opus-4-8",
6490
- label: "Opus 4.8",
6491
- description: "Opus 4.8 (high reasoning)",
6492
- updateArgs: {
6493
- context_window: 200000,
6494
- max_output_tokens: 128000,
6495
- reasoning_effort: "high",
6496
- enable_reasoner: true,
6497
- parallel_tool_calls: true
6498
- }
6499
- },
6500
- {
6501
- id: "opus-4.8-xhigh",
6502
- handle: "anthropic/claude-opus-4-8",
6503
- label: "Opus 4.8",
6504
- description: "Opus 4.8 (extra-high reasoning)",
6505
- updateArgs: {
6506
- context_window: 200000,
6507
- max_output_tokens: 128000,
6508
- reasoning_effort: "xhigh",
6509
- enable_reasoner: true,
6510
- parallel_tool_calls: true
6511
- }
6512
- },
6513
- {
6514
- id: "opus-4.8-max",
6515
- handle: "anthropic/claude-opus-4-8",
6516
- label: "Opus 4.8",
6517
- description: "Opus 4.8 (max reasoning)",
6518
- updateArgs: {
6519
- context_window: 200000,
6520
- max_output_tokens: 128000,
6521
- reasoning_effort: "max",
6522
- enable_reasoner: true,
6523
- parallel_tool_calls: true
6524
- }
6525
- },
6526
- {
6527
- id: "opus-4.8-1m",
6528
- handle: "anthropic/claude-opus-4-8",
6529
- label: "Opus 4.8 1M",
6530
- description: "Claude Opus 4.8 with 1M token context window (high reasoning)",
6531
- updateArgs: {
6532
- context_window: 950000,
6533
- max_output_tokens: 128000,
6534
- reasoning_effort: "high",
6535
- enable_reasoner: true,
6536
- parallel_tool_calls: true
6537
- }
6538
- },
6539
- {
6540
- id: "opus-4.8-1m-no-reasoning",
6541
- handle: "anthropic/claude-opus-4-8",
6542
- label: "Opus 4.8 1M",
6543
- description: "Opus 4.8 1M with no reasoning (faster)",
6544
- updateArgs: {
6545
- context_window: 950000,
6546
- max_output_tokens: 128000,
6547
- reasoning_effort: "none",
6548
- enable_reasoner: false,
6549
- parallel_tool_calls: true
6550
- }
6551
- },
6552
- {
6553
- id: "opus-4.8-1m-low",
6554
- handle: "anthropic/claude-opus-4-8",
6555
- label: "Opus 4.8 1M",
6556
- description: "Opus 4.8 1M (low reasoning)",
6557
- updateArgs: {
6558
- context_window: 950000,
6559
- max_output_tokens: 128000,
6560
- reasoning_effort: "low",
6561
- enable_reasoner: true,
6562
- parallel_tool_calls: true,
6563
- max_reasoning_tokens: 4000
6564
- }
6565
- },
6566
- {
6567
- id: "opus-4.8-1m-medium",
6568
- handle: "anthropic/claude-opus-4-8",
6569
- label: "Opus 4.8 1M",
6570
- description: "Opus 4.8 1M (med reasoning)",
6571
- updateArgs: {
6572
- context_window: 950000,
6573
- max_output_tokens: 128000,
6574
- reasoning_effort: "medium",
6575
- enable_reasoner: true,
6576
- parallel_tool_calls: true,
6577
- max_reasoning_tokens: 12000
6578
- }
6579
- },
6580
- {
6581
- id: "opus-4.8-1m-xhigh",
6582
- handle: "anthropic/claude-opus-4-8",
6583
- label: "Opus 4.8 1M",
6584
- description: "Opus 4.8 1M (max reasoning)",
6585
- updateArgs: {
6586
- context_window: 950000,
6587
- max_output_tokens: 128000,
6588
- reasoning_effort: "xhigh",
6589
- enable_reasoner: true,
6590
- parallel_tool_calls: true
6591
- }
6592
- },
6593
- {
6594
- id: "opus-1m",
6595
- handle: "anthropic/claude-opus-4-6",
6596
- label: "Opus 4.6 1M",
6597
- description: "Claude Opus 4.6 with 1M token context window (high reasoning)",
6598
- updateArgs: {
6599
- context_window: 950000,
6600
- max_output_tokens: 128000,
6601
- reasoning_effort: "high",
6602
- enable_reasoner: true,
6603
- parallel_tool_calls: true
6604
- }
6605
- },
6606
- {
6607
- id: "opus-1m-no-reasoning",
6608
- handle: "anthropic/claude-opus-4-6",
6609
- label: "Opus 4.6 1M",
6610
- description: "Opus 4.6 1M with no reasoning (faster)",
6611
- updateArgs: {
6612
- context_window: 950000,
6613
- max_output_tokens: 128000,
6614
- reasoning_effort: "none",
6615
- enable_reasoner: false,
6616
- parallel_tool_calls: true
6617
- }
6618
- },
6619
- {
6620
- id: "opus-1m-low",
6621
- handle: "anthropic/claude-opus-4-6",
6622
- label: "Opus 4.6 1M",
6623
- description: "Opus 4.6 1M (low reasoning)",
6624
- updateArgs: {
6625
- context_window: 950000,
6626
- max_output_tokens: 128000,
6627
- reasoning_effort: "low",
6628
- enable_reasoner: true,
6629
- max_reasoning_tokens: 4000,
6630
- parallel_tool_calls: true
6631
- }
6632
- },
6633
- {
6634
- id: "opus-1m-medium",
6635
- handle: "anthropic/claude-opus-4-6",
6636
- label: "Opus 4.6 1M",
6637
- description: "Opus 4.6 1M (med reasoning)",
6638
- updateArgs: {
6639
- context_window: 950000,
6640
- max_output_tokens: 128000,
6641
- reasoning_effort: "medium",
6642
- enable_reasoner: true,
6643
- max_reasoning_tokens: 12000,
6644
- parallel_tool_calls: true
6645
- }
6646
- },
6647
- {
6648
- id: "opus-1m-xhigh",
6649
- handle: "anthropic/claude-opus-4-6",
6650
- label: "Opus 4.6 1M",
6651
- description: "Opus 4.6 1M (max reasoning)",
6652
- updateArgs: {
6653
- context_window: 950000,
6654
- max_output_tokens: 128000,
6655
- reasoning_effort: "xhigh",
6656
- enable_reasoner: true,
6657
- parallel_tool_calls: true
6658
- }
6659
- },
6660
- {
6661
- id: "sonnet",
6662
- handle: "anthropic/claude-sonnet-5",
6663
- label: "Sonnet 5",
6664
- description: "Sonnet 5 (high reasoning)",
6665
- isFeatured: true,
6666
- updateArgs: {
6667
- context_window: 1e6,
6668
- max_output_tokens: 128000,
6669
- reasoning_effort: "high",
6670
- enable_reasoner: true,
6671
- parallel_tool_calls: true
6672
- }
6673
- },
6674
- {
6675
- id: "sonnet-5-no-reasoning",
6676
- handle: "anthropic/claude-sonnet-5",
6677
- label: "Sonnet 5",
6678
- description: "Sonnet 5 with no reasoning (faster)",
6679
- updateArgs: {
6680
- context_window: 1e6,
6681
- max_output_tokens: 128000,
6682
- reasoning_effort: "none",
6683
- enable_reasoner: false,
6684
- parallel_tool_calls: true
6685
- }
6686
- },
6687
- {
6688
- id: "sonnet-5-low",
6689
- handle: "anthropic/claude-sonnet-5",
6690
- label: "Sonnet 5",
6691
- description: "Sonnet 5 (low reasoning)",
6692
- updateArgs: {
6693
- context_window: 1e6,
6694
- max_output_tokens: 128000,
6695
- reasoning_effort: "low",
6696
- enable_reasoner: true,
6697
- max_reasoning_tokens: 4000,
6698
- parallel_tool_calls: true
6699
- }
6700
- },
6701
- {
6702
- id: "sonnet-5-medium",
6703
- handle: "anthropic/claude-sonnet-5",
6704
- label: "Sonnet 5",
6705
- description: "Sonnet 5 (med reasoning)",
6706
- updateArgs: {
6707
- context_window: 1e6,
6708
- max_output_tokens: 128000,
6709
- reasoning_effort: "medium",
6710
- enable_reasoner: true,
6711
- max_reasoning_tokens: 12000,
6712
- parallel_tool_calls: true
6713
- }
6714
- },
6715
- {
6716
- id: "sonnet-5-xhigh",
6717
- handle: "anthropic/claude-sonnet-5",
6718
- label: "Sonnet 5",
6719
- description: "Sonnet 5 (extra-high reasoning)",
6720
- updateArgs: {
6721
- context_window: 1e6,
6722
- max_output_tokens: 128000,
6723
- reasoning_effort: "xhigh",
6724
- enable_reasoner: true,
6725
- parallel_tool_calls: true
6726
- }
6727
- },
6728
- {
6729
- id: "sonnet-5-max",
6730
- handle: "anthropic/claude-sonnet-5",
6731
- label: "Sonnet 5",
6732
- description: "Sonnet 5 (max reasoning)",
6733
- updateArgs: {
6734
- context_window: 1e6,
6735
- max_output_tokens: 128000,
6736
- reasoning_effort: "max",
6737
- enable_reasoner: true,
6738
- parallel_tool_calls: true
6739
- }
6740
- },
6741
- {
6742
- id: "sonnet-4.6",
6743
- handle: "anthropic/claude-sonnet-4-6",
6744
- label: "Sonnet 4.6",
6745
- description: "Sonnet 4.6 (high reasoning)",
6746
- updateArgs: {
6747
- context_window: 200000,
6748
- max_output_tokens: 128000,
6749
- reasoning_effort: "high",
6750
- enable_reasoner: true,
6751
- parallel_tool_calls: true
6752
- }
6753
- },
6754
- {
6755
- id: "sonnet-4.6-no-reasoning",
6756
- handle: "anthropic/claude-sonnet-4-6",
6757
- label: "Sonnet 4.6",
6758
- description: "Sonnet 4.6 with no reasoning (faster)",
6759
- updateArgs: {
6760
- context_window: 200000,
6761
- max_output_tokens: 128000,
6762
- reasoning_effort: "none",
6763
- enable_reasoner: false,
6764
- parallel_tool_calls: true
6765
- }
6766
- },
6767
- {
6768
- id: "sonnet-4.6-low",
6769
- handle: "anthropic/claude-sonnet-4-6",
6770
- label: "Sonnet 4.6",
6771
- description: "Sonnet 4.6 (low reasoning)",
6772
- updateArgs: {
6773
- context_window: 200000,
6774
- max_output_tokens: 128000,
6775
- reasoning_effort: "low",
6776
- enable_reasoner: true,
6777
- max_reasoning_tokens: 4000,
6778
- parallel_tool_calls: true
6779
- }
6780
- },
6781
- {
6782
- id: "sonnet-4.6-medium",
6783
- handle: "anthropic/claude-sonnet-4-6",
6784
- label: "Sonnet 4.6",
6785
- description: "Sonnet 4.6 (med reasoning)",
6786
- updateArgs: {
6787
- context_window: 200000,
6788
- max_output_tokens: 128000,
6789
- reasoning_effort: "medium",
6790
- enable_reasoner: true,
6791
- max_reasoning_tokens: 12000,
6792
- parallel_tool_calls: true
6793
- }
6794
- },
6795
- {
6796
- id: "sonnet-4.6-xhigh",
6797
- handle: "anthropic/claude-sonnet-4-6",
6798
- label: "Sonnet 4.6",
6799
- description: "Sonnet 4.6 (max reasoning)",
6800
- updateArgs: {
6801
- context_window: 200000,
6802
- max_output_tokens: 128000,
6803
- reasoning_effort: "xhigh",
6804
- enable_reasoner: true,
6805
- parallel_tool_calls: true
6806
- }
6807
- },
6808
- {
6809
- id: "sonnet-1m",
6810
- handle: "anthropic/claude-sonnet-4-6",
6811
- label: "Sonnet 4.6 1M",
6812
- description: "Claude Sonnet 4.6 with 1M token context window (high reasoning)",
6813
- updateArgs: {
6814
- context_window: 9500000,
6815
- max_output_tokens: 128000,
6816
- reasoning_effort: "high",
6817
- enable_reasoner: true,
6818
- parallel_tool_calls: true
6819
- }
6820
- },
6821
- {
6822
- id: "sonnet-1m-no-reasoning",
6823
- handle: "anthropic/claude-sonnet-4-6",
6824
- label: "Sonnet 4.6 1M",
6825
- description: "Sonnet 4.6 1M with no reasoning (faster)",
6826
- updateArgs: {
6827
- context_window: 9500000,
6828
- max_output_tokens: 128000,
6829
- reasoning_effort: "none",
6830
- enable_reasoner: false,
6831
- parallel_tool_calls: true
6832
- }
6833
- },
6834
- {
6835
- id: "sonnet-1m-low",
6836
- handle: "anthropic/claude-sonnet-4-6",
6837
- label: "Sonnet 4.6 1M",
6838
- description: "Sonnet 4.6 1M (low reasoning)",
6839
- updateArgs: {
6840
- context_window: 9500000,
6841
- max_output_tokens: 128000,
6842
- reasoning_effort: "low",
6843
- enable_reasoner: true,
6844
- max_reasoning_tokens: 4000,
6845
- parallel_tool_calls: true
6846
- }
6847
- },
6848
- {
6849
- id: "sonnet-1m-medium",
6850
- handle: "anthropic/claude-sonnet-4-6",
6851
- label: "Sonnet 4.6 1M",
6852
- description: "Sonnet 4.6 1M (med reasoning)",
6853
- updateArgs: {
6854
- context_window: 9500000,
6855
- max_output_tokens: 128000,
6856
- reasoning_effort: "medium",
6857
- enable_reasoner: true,
6858
- max_reasoning_tokens: 12000,
6859
- parallel_tool_calls: true
6860
- }
6861
- },
6862
- {
6863
- id: "sonnet-1m-xhigh",
6864
- handle: "anthropic/claude-sonnet-4-6",
6865
- label: "Sonnet 4.6 1M",
6866
- description: "Sonnet 4.6 1M (max reasoning)",
6867
- updateArgs: {
6868
- context_window: 9500000,
6869
- max_output_tokens: 128000,
6870
- reasoning_effort: "xhigh",
6871
- enable_reasoner: true,
6872
- parallel_tool_calls: true
6873
- }
6874
- },
6875
- {
6876
- id: "opus-4.6-high",
6877
- handle: "anthropic/claude-opus-4-6",
6878
- label: "Opus 4.6",
6879
- description: "Opus 4.6 (high reasoning)",
6880
- updateArgs: {
6881
- context_window: 200000,
6882
- max_output_tokens: 128000,
6883
- reasoning_effort: "high",
6884
- enable_reasoner: true,
6885
- parallel_tool_calls: true
6886
- }
6887
- },
6888
- {
6889
- id: "opus-4.6-no-reasoning",
6890
- handle: "anthropic/claude-opus-4-6",
6891
- label: "Opus 4.6",
6892
- description: "Opus 4.6 with no reasoning (faster)",
6893
- updateArgs: {
6894
- context_window: 200000,
6895
- max_output_tokens: 128000,
6896
- reasoning_effort: "none",
6897
- enable_reasoner: false,
6898
- parallel_tool_calls: true
6899
- }
6900
- },
6901
- {
6902
- id: "opus-4.6-low",
6903
- handle: "anthropic/claude-opus-4-6",
6904
- label: "Opus 4.6",
6905
- description: "Opus 4.6 (low reasoning)",
6906
- updateArgs: {
6907
- context_window: 200000,
6908
- max_output_tokens: 128000,
6909
- reasoning_effort: "low",
6910
- enable_reasoner: true,
6911
- max_reasoning_tokens: 4000,
6912
- parallel_tool_calls: true
6913
- }
6914
- },
6915
- {
6916
- id: "opus-4.6-medium",
6917
- handle: "anthropic/claude-opus-4-6",
6918
- label: "Opus 4.6",
6919
- description: "Opus 4.6 (med reasoning)",
6920
- updateArgs: {
6921
- context_window: 200000,
6922
- max_output_tokens: 128000,
6923
- reasoning_effort: "medium",
6924
- enable_reasoner: true,
6925
- max_reasoning_tokens: 12000,
6926
- parallel_tool_calls: true
6927
- }
6928
- },
6929
- {
6930
- id: "opus-4.6-xhigh",
6931
- handle: "anthropic/claude-opus-4-6",
6932
- label: "Opus 4.6",
6933
- description: "Opus 4.6 (max reasoning)",
6934
- updateArgs: {
6935
- context_window: 200000,
6936
- max_output_tokens: 128000,
6937
- reasoning_effort: "xhigh",
6938
- enable_reasoner: true,
6939
- parallel_tool_calls: true
6940
- }
6941
- },
6942
- {
6943
- id: "opus-4.7-medium",
6944
- handle: "anthropic/claude-opus-4-7",
6945
- label: "Opus 4.7",
6946
- description: "Opus 4.7 (med reasoning)",
6947
- updateArgs: {
6948
- context_window: 200000,
6949
- max_output_tokens: 128000,
6950
- reasoning_effort: "medium",
6951
- enable_reasoner: true,
6952
- max_reasoning_tokens: 12000,
6953
- parallel_tool_calls: true
6954
- }
6955
- },
6956
- {
6957
- id: "opus-4.7-low",
6958
- handle: "anthropic/claude-opus-4-7",
6959
- label: "Opus 4.7",
6960
- description: "Opus 4.7 (low reasoning)",
6961
- updateArgs: {
6962
- context_window: 200000,
6963
- max_output_tokens: 128000,
6964
- reasoning_effort: "low",
6965
- enable_reasoner: true,
6966
- max_reasoning_tokens: 4000,
6967
- parallel_tool_calls: true
6968
- }
6969
- },
6970
- {
6971
- id: "opus-4.7-high",
6972
- handle: "anthropic/claude-opus-4-7",
6973
- label: "Opus 4.7",
6974
- description: "Opus 4.7 (high reasoning)",
6975
- updateArgs: {
6976
- context_window: 200000,
6977
- max_output_tokens: 128000,
6978
- reasoning_effort: "high",
6979
- enable_reasoner: true,
6980
- parallel_tool_calls: true
6981
- }
6982
- },
6983
- {
6984
- id: "opus-4.7-xhigh",
6985
- handle: "anthropic/claude-opus-4-7",
6986
- label: "Opus 4.7",
6987
- description: "Opus 4.7 (extra-high reasoning)",
6988
- updateArgs: {
6989
- context_window: 200000,
6990
- max_output_tokens: 128000,
6991
- reasoning_effort: "xhigh",
6992
- enable_reasoner: true,
6993
- parallel_tool_calls: true
6994
- }
6995
- },
6996
- {
6997
- id: "opus-4.7-max",
6998
- handle: "anthropic/claude-opus-4-7",
6999
- label: "Opus 4.7",
7000
- description: "Opus 4.7 (max reasoning)",
7001
- updateArgs: {
7002
- context_window: 200000,
7003
- max_output_tokens: 128000,
7004
- reasoning_effort: "max",
7005
- enable_reasoner: true,
7006
- parallel_tool_calls: true
7007
- }
7008
- },
7009
- {
7010
- id: "opus-4.5",
7011
- handle: "anthropic/claude-opus-4-5-20251101",
7012
- label: "Opus 4.5",
7013
- description: "Opus 4.5 (high reasoning)",
7014
- updateArgs: {
7015
- context_window: 180000,
7016
- max_output_tokens: 64000,
7017
- reasoning_effort: "high",
7018
- enable_reasoner: true,
7019
- max_reasoning_tokens: 31999,
7020
- parallel_tool_calls: true
7021
- }
7022
- },
7023
- {
7024
- id: "opus-4.5-no-reasoning",
7025
- handle: "anthropic/claude-opus-4-5-20251101",
7026
- label: "Opus 4.5",
7027
- description: "Opus 4.5 with no reasoning (faster)",
7028
- updateArgs: {
7029
- context_window: 180000,
7030
- max_output_tokens: 64000,
7031
- reasoning_effort: "none",
7032
- enable_reasoner: false,
7033
- parallel_tool_calls: true
7034
- }
7035
- },
7036
- {
7037
- id: "opus-4.5-low",
7038
- handle: "anthropic/claude-opus-4-5-20251101",
7039
- label: "Opus 4.5",
7040
- description: "Opus 4.5 (low reasoning)",
7041
- updateArgs: {
7042
- context_window: 180000,
7043
- max_output_tokens: 64000,
7044
- reasoning_effort: "low",
7045
- enable_reasoner: true,
7046
- max_reasoning_tokens: 4000,
7047
- parallel_tool_calls: true
7048
- }
7049
- },
7050
- {
7051
- id: "opus-4.5-medium",
7052
- handle: "anthropic/claude-opus-4-5-20251101",
7053
- label: "Opus 4.5",
7054
- description: "Opus 4.5 (med reasoning)",
7055
- updateArgs: {
7056
- context_window: 180000,
7057
- max_output_tokens: 64000,
7058
- reasoning_effort: "medium",
7059
- enable_reasoner: true,
7060
- max_reasoning_tokens: 12000,
7061
- parallel_tool_calls: true
7062
- }
7063
- },
7064
- {
7065
- id: "bedrock-opus-4.5",
7066
- handle: "bedrock/us.anthropic.claude-opus-4-5-20251101-v1:0",
7067
- label: "Bedrock Opus 4.5",
7068
- shortLabel: "Opus 4.5 BR",
7069
- description: "Opus 4.5 via AWS Bedrock",
7070
- updateArgs: {
7071
- context_window: 180000,
7072
- max_output_tokens: 64000,
7073
- max_reasoning_tokens: 31999,
7074
- parallel_tool_calls: true
7075
- }
7076
- },
7077
- {
7078
- id: "haiku",
7079
- handle: "anthropic/claude-haiku-4-5",
7080
- label: "Haiku 4.5",
7081
- description: "Haiku 4.5",
7082
- updateArgs: {
7083
- context_window: 180000,
7084
- max_output_tokens: 64000,
7085
- parallel_tool_calls: true
7086
- }
7087
- },
7088
- {
7089
- id: "gpt-5.5-plus-pro-none",
7090
- handle: "chatgpt-plus-pro/gpt-5.5",
7091
- label: "GPT-5.5 (ChatGPT)",
7092
- description: "GPT-5.5 (no reasoning) via ChatGPT Plus/Pro",
7093
- updateArgs: {
7094
- reasoning_effort: "none",
7095
- verbosity: "low",
7096
- context_window: 272000,
7097
- max_output_tokens: 128000,
7098
- parallel_tool_calls: true
7099
- }
7100
- },
7101
- {
7102
- id: "gpt-5.5-plus-pro-low",
7103
- handle: "chatgpt-plus-pro/gpt-5.5",
7104
- label: "GPT-5.5 (ChatGPT)",
7105
- description: "GPT-5.5 (low reasoning) via ChatGPT Plus/Pro",
7106
- updateArgs: {
7107
- reasoning_effort: "low",
7108
- verbosity: "low",
7109
- context_window: 272000,
7110
- max_output_tokens: 128000,
7111
- parallel_tool_calls: true
7112
- }
7113
- },
7114
- {
7115
- id: "gpt-5.5-plus-pro-medium",
7116
- handle: "chatgpt-plus-pro/gpt-5.5",
7117
- label: "GPT-5.5 (ChatGPT)",
7118
- description: "GPT-5.5 (med reasoning) via ChatGPT Plus/Pro",
7119
- updateArgs: {
7120
- reasoning_effort: "medium",
7121
- verbosity: "low",
7122
- context_window: 272000,
7123
- max_output_tokens: 128000,
7124
- parallel_tool_calls: true
7125
- }
7126
- },
7127
- {
7128
- id: "gpt-5.5-plus-pro-high",
7129
- handle: "chatgpt-plus-pro/gpt-5.5",
7130
- label: "GPT-5.5 (ChatGPT)",
7131
- description: "OpenAI's most capable model (high reasoning) via ChatGPT Plus/Pro",
7132
- updateArgs: {
7133
- reasoning_effort: "high",
7134
- verbosity: "low",
7135
- context_window: 272000,
7136
- max_output_tokens: 128000,
7137
- parallel_tool_calls: true
7138
- }
7139
- },
7140
- {
7141
- id: "gpt-5.5-plus-pro-xhigh",
7142
- handle: "chatgpt-plus-pro/gpt-5.5",
7143
- label: "GPT-5.5 (ChatGPT)",
7144
- description: "GPT-5.5 (max reasoning) via ChatGPT Plus/Pro",
7145
- updateArgs: {
7146
- reasoning_effort: "xhigh",
7147
- verbosity: "low",
7148
- context_window: 272000,
7149
- max_output_tokens: 128000,
7150
- parallel_tool_calls: true
7151
- }
7152
- },
7153
- {
7154
- id: "gpt-5.5-fast-plus-pro-none",
7155
- handle: "chatgpt-plus-pro/gpt-5.5-fast",
7156
- label: "GPT-5.5 Fast (ChatGPT)",
7157
- description: "GPT-5.5 Fast (no reasoning) via ChatGPT Plus/Pro",
7158
- updateArgs: {
7159
- reasoning_effort: "none",
7160
- verbosity: "low",
7161
- context_window: 272000,
7162
- max_output_tokens: 128000,
7163
- parallel_tool_calls: true
7164
- }
7165
- },
7166
- {
7167
- id: "gpt-5.5-fast-plus-pro-low",
7168
- handle: "chatgpt-plus-pro/gpt-5.5-fast",
7169
- label: "GPT-5.5 Fast (ChatGPT)",
7170
- description: "GPT-5.5 Fast (low reasoning) via ChatGPT Plus/Pro",
7171
- updateArgs: {
7172
- reasoning_effort: "low",
7173
- verbosity: "low",
7174
- context_window: 272000,
7175
- max_output_tokens: 128000,
7176
- parallel_tool_calls: true
7177
- }
7178
- },
7179
- {
7180
- id: "gpt-5.5-fast-plus-pro-medium",
7181
- handle: "chatgpt-plus-pro/gpt-5.5-fast",
7182
- label: "GPT-5.5 Fast (ChatGPT)",
7183
- description: "GPT-5.5 Fast (med reasoning) via ChatGPT Plus/Pro",
7184
- updateArgs: {
7185
- reasoning_effort: "medium",
7186
- verbosity: "low",
7187
- context_window: 272000,
7188
- max_output_tokens: 128000,
7189
- parallel_tool_calls: true
7190
- }
7191
- },
7192
- {
7193
- id: "gpt-5.5-fast-plus-pro-high",
7194
- handle: "chatgpt-plus-pro/gpt-5.5-fast",
7195
- label: "GPT-5.5 Fast (ChatGPT)",
7196
- description: "GPT-5.5 Fast (high reasoning) via ChatGPT Plus/Pro",
7197
- updateArgs: {
7198
- reasoning_effort: "high",
7199
- verbosity: "low",
7200
- context_window: 272000,
7201
- max_output_tokens: 128000,
7202
- parallel_tool_calls: true
7203
- }
7204
- },
7205
- {
7206
- id: "gpt-5.5-fast-plus-pro-xhigh",
7207
- handle: "chatgpt-plus-pro/gpt-5.5-fast",
7208
- label: "GPT-5.5 Fast (ChatGPT)",
7209
- description: "GPT-5.5 Fast (max reasoning) via ChatGPT Plus/Pro",
7210
- updateArgs: {
7211
- reasoning_effort: "xhigh",
7212
- verbosity: "low",
7213
- context_window: 272000,
7214
- max_output_tokens: 128000,
7215
- parallel_tool_calls: true
7216
- }
7217
- },
7218
- {
7219
- id: "gpt-5.4-plus-pro-none",
7220
- handle: "chatgpt-plus-pro/gpt-5.4",
7221
- label: "GPT-5.4 (ChatGPT)",
7222
- description: "GPT-5.4 (no reasoning) via ChatGPT Plus/Pro",
7223
- updateArgs: {
7224
- reasoning_effort: "none",
7225
- verbosity: "low",
7226
- context_window: 272000,
7227
- max_output_tokens: 128000,
7228
- parallel_tool_calls: true
7229
- }
7230
- },
7231
- {
7232
- id: "gpt-5.4-plus-pro-low",
7233
- handle: "chatgpt-plus-pro/gpt-5.4",
7234
- label: "GPT-5.4 (ChatGPT)",
7235
- description: "GPT-5.4 (low reasoning) via ChatGPT Plus/Pro",
7236
- updateArgs: {
7237
- reasoning_effort: "low",
7238
- verbosity: "low",
7239
- context_window: 272000,
7240
- max_output_tokens: 128000,
7241
- parallel_tool_calls: true
7242
- }
7243
- },
7244
- {
7245
- id: "gpt-5.4-plus-pro-medium",
7246
- handle: "chatgpt-plus-pro/gpt-5.4",
7247
- label: "GPT-5.4 (ChatGPT)",
7248
- description: "GPT-5.4 (med reasoning) via ChatGPT Plus/Pro",
7249
- updateArgs: {
7250
- reasoning_effort: "medium",
7251
- verbosity: "low",
7252
- context_window: 272000,
7253
- max_output_tokens: 128000,
7254
- parallel_tool_calls: true
7255
- }
7256
- },
7257
- {
7258
- id: "gpt-5.4-plus-pro-high",
7259
- handle: "chatgpt-plus-pro/gpt-5.4",
7260
- label: "GPT-5.4 (ChatGPT)",
7261
- description: "OpenAI's most capable model (high reasoning) via ChatGPT Plus/Pro",
7262
- updateArgs: {
7263
- reasoning_effort: "high",
7264
- verbosity: "low",
7265
- context_window: 272000,
7266
- max_output_tokens: 128000,
7267
- parallel_tool_calls: true
7268
- }
7269
- },
7270
- {
7271
- id: "gpt-5.4-plus-pro-xhigh",
7272
- handle: "chatgpt-plus-pro/gpt-5.4",
7273
- label: "GPT-5.4 (ChatGPT)",
7274
- description: "GPT-5.4 (max reasoning) via ChatGPT Plus/Pro",
7275
- updateArgs: {
7276
- reasoning_effort: "xhigh",
7277
- verbosity: "low",
7278
- context_window: 272000,
7279
- max_output_tokens: 128000,
7280
- parallel_tool_calls: true
7281
- }
7282
- },
7283
- {
7284
- id: "gpt-5.4-pro-plus-pro-medium",
7285
- handle: "chatgpt-plus-pro/gpt-5.4-pro",
7286
- label: "GPT-5.4 Pro (ChatGPT)",
7287
- description: "GPT-5.4 Pro (med reasoning) via ChatGPT Plus/Pro",
7288
- updateArgs: {
7289
- reasoning_effort: "medium",
7290
- verbosity: "low",
7291
- context_window: 272000,
7292
- max_output_tokens: 128000,
7293
- parallel_tool_calls: true
7294
- }
7295
- },
7296
- {
7297
- id: "gpt-5.4-pro-plus-pro-high",
7298
- handle: "chatgpt-plus-pro/gpt-5.4-pro",
7299
- label: "GPT-5.4 Pro (ChatGPT)",
7300
- description: "GPT-5.4 Pro (high reasoning) via ChatGPT Plus/Pro",
7301
- updateArgs: {
7302
- reasoning_effort: "high",
7303
- verbosity: "low",
7304
- context_window: 272000,
7305
- max_output_tokens: 128000,
7306
- parallel_tool_calls: true
7307
- }
7308
- },
7309
- {
7310
- id: "gpt-5.4-pro-plus-pro-xhigh",
7311
- handle: "chatgpt-plus-pro/gpt-5.4-pro",
7312
- label: "GPT-5.4 Pro (ChatGPT)",
7313
- description: "GPT-5.4 Pro (max reasoning) via ChatGPT Plus/Pro",
7314
- updateArgs: {
7315
- reasoning_effort: "xhigh",
7316
- verbosity: "low",
7317
- context_window: 272000,
7318
- max_output_tokens: 128000,
7319
- parallel_tool_calls: true
7320
- }
7321
- },
7322
- {
7323
- id: "gpt-5.4-fast-plus-pro-none",
7324
- handle: "chatgpt-plus-pro/gpt-5.4-fast",
7325
- label: "GPT-5.4 Fast (ChatGPT)",
7326
- description: "GPT-5.4 Fast (no reasoning) via ChatGPT Plus/Pro",
7327
- updateArgs: {
7328
- reasoning_effort: "none",
7329
- verbosity: "low",
7330
- context_window: 272000,
7331
- max_output_tokens: 128000,
7332
- parallel_tool_calls: true
7333
- }
7334
- },
7335
- {
7336
- id: "gpt-5.4-fast-plus-pro-low",
7337
- handle: "chatgpt-plus-pro/gpt-5.4-fast",
7338
- label: "GPT-5.4 Fast (ChatGPT)",
7339
- description: "GPT-5.4 Fast (low reasoning) via ChatGPT Plus/Pro",
7340
- updateArgs: {
7341
- reasoning_effort: "low",
7342
- verbosity: "low",
7343
- context_window: 272000,
7344
- max_output_tokens: 128000,
7345
- parallel_tool_calls: true
7346
- }
7347
- },
7348
- {
7349
- id: "gpt-5.4-fast-plus-pro-medium",
7350
- handle: "chatgpt-plus-pro/gpt-5.4-fast",
7351
- label: "GPT-5.4 Fast (ChatGPT)",
7352
- description: "GPT-5.4 Fast (med reasoning) via ChatGPT Plus/Pro",
7353
- updateArgs: {
7354
- reasoning_effort: "medium",
7355
- verbosity: "low",
7356
- context_window: 272000,
7357
- max_output_tokens: 128000,
7358
- parallel_tool_calls: true
7359
- }
7360
- },
7361
- {
7362
- id: "gpt-5.4-fast-plus-pro-high",
7363
- handle: "chatgpt-plus-pro/gpt-5.4-fast",
7364
- label: "GPT-5.4 Fast (ChatGPT)",
7365
- description: "GPT-5.4 Fast (high reasoning) via ChatGPT Plus/Pro",
7366
- updateArgs: {
7367
- reasoning_effort: "high",
7368
- verbosity: "low",
7369
- context_window: 272000,
7370
- max_output_tokens: 128000,
7371
- parallel_tool_calls: true
7372
- }
7373
- },
7374
- {
7375
- id: "gpt-5.4-fast-plus-pro-xhigh",
7376
- handle: "chatgpt-plus-pro/gpt-5.4-fast",
7377
- label: "GPT-5.4 Fast (ChatGPT)",
7378
- description: "GPT-5.4 Fast (max reasoning) via ChatGPT Plus/Pro",
7379
- updateArgs: {
7380
- reasoning_effort: "xhigh",
7381
- verbosity: "low",
7382
- context_window: 272000,
7383
- max_output_tokens: 128000,
7384
- parallel_tool_calls: true
7385
- }
7386
- },
7387
- {
7388
- id: "gpt-5.4-mini-plus-pro-none",
7389
- handle: "chatgpt-plus-pro/gpt-5.4-mini",
7390
- label: "GPT-5.4 Mini (ChatGPT)",
7391
- description: "GPT-5.4 Mini (no reasoning) via ChatGPT Plus/Pro",
7392
- updateArgs: {
7393
- reasoning_effort: "none",
7394
- verbosity: "low",
7395
- context_window: 272000,
7396
- max_output_tokens: 128000,
7397
- parallel_tool_calls: true
7398
- }
7399
- },
7400
- {
7401
- id: "gpt-5.4-mini-plus-pro-low",
7402
- handle: "chatgpt-plus-pro/gpt-5.4-mini",
7403
- label: "GPT-5.4 Mini (ChatGPT)",
7404
- description: "GPT-5.4 Mini (low reasoning) via ChatGPT Plus/Pro",
7405
- updateArgs: {
7406
- reasoning_effort: "low",
7407
- verbosity: "low",
7408
- context_window: 272000,
7409
- max_output_tokens: 128000,
7410
- parallel_tool_calls: true
7411
- }
7412
- },
7413
- {
7414
- id: "gpt-5.4-mini-plus-pro-medium",
7415
- handle: "chatgpt-plus-pro/gpt-5.4-mini",
7416
- label: "GPT-5.4 Mini (ChatGPT)",
7417
- description: "GPT-5.4 Mini (med reasoning) via ChatGPT Plus/Pro",
7418
- updateArgs: {
7419
- reasoning_effort: "medium",
7420
- verbosity: "low",
7421
- context_window: 272000,
7422
- max_output_tokens: 128000,
7423
- parallel_tool_calls: true
7424
- }
7425
- },
7426
- {
7427
- id: "gpt-5.4-mini-plus-pro-high",
7428
- handle: "chatgpt-plus-pro/gpt-5.4-mini",
7429
- label: "GPT-5.4 Mini (ChatGPT)",
7430
- description: "GPT-5.4 Mini (high reasoning) via ChatGPT Plus/Pro",
7431
- updateArgs: {
7432
- reasoning_effort: "high",
7433
- verbosity: "low",
7434
- context_window: 272000,
7435
- max_output_tokens: 128000,
7436
- parallel_tool_calls: true
7437
- }
7438
- },
7439
- {
7440
- id: "gpt-5.4-mini-plus-pro-xhigh",
7441
- handle: "chatgpt-plus-pro/gpt-5.4-mini",
7442
- label: "GPT-5.4 Mini (ChatGPT)",
7443
- description: "GPT-5.4 Mini (max reasoning) via ChatGPT Plus/Pro",
7444
- updateArgs: {
7445
- reasoning_effort: "xhigh",
7446
- verbosity: "low",
7447
- context_window: 272000,
7448
- max_output_tokens: 128000,
7449
- parallel_tool_calls: true
7450
- }
7451
- },
7452
- {
7453
- id: "gpt-5.3-codex-spark-plus-pro-none",
7454
- handle: "chatgpt-plus-pro/gpt-5.3-codex-spark",
7455
- label: "GPT-5.3 Codex Spark (ChatGPT)",
7456
- description: "GPT-5.3 Codex Spark (no reasoning) via ChatGPT Plus/Pro",
7457
- updateArgs: {
7458
- reasoning_effort: "none",
7459
- verbosity: "low",
7460
- context_window: 128000,
7461
- max_output_tokens: 128000,
7462
- parallel_tool_calls: true
7463
- }
7464
- },
7465
- {
7466
- id: "gpt-5.3-codex-spark-plus-pro-low",
7467
- handle: "chatgpt-plus-pro/gpt-5.3-codex-spark",
7468
- label: "GPT-5.3 Codex Spark (ChatGPT)",
7469
- description: "GPT-5.3 Codex Spark (low reasoning) via ChatGPT Plus/Pro",
7470
- updateArgs: {
7471
- reasoning_effort: "low",
7472
- verbosity: "low",
7473
- context_window: 128000,
7474
- max_output_tokens: 128000,
7475
- parallel_tool_calls: true
7476
- }
7477
- },
7478
- {
7479
- id: "gpt-5.3-codex-spark-plus-pro-medium",
7480
- handle: "chatgpt-plus-pro/gpt-5.3-codex-spark",
7481
- label: "GPT-5.3 Codex Spark (ChatGPT)",
7482
- description: "GPT-5.3 Codex Spark (med reasoning) via ChatGPT Plus/Pro",
7483
- updateArgs: {
7484
- reasoning_effort: "medium",
7485
- verbosity: "low",
7486
- context_window: 128000,
7487
- max_output_tokens: 128000,
7488
- parallel_tool_calls: true
7489
- }
7490
- },
7491
- {
7492
- id: "gpt-5.3-codex-spark-plus-pro-high",
7493
- handle: "chatgpt-plus-pro/gpt-5.3-codex-spark",
7494
- label: "GPT-5.3 Codex Spark (ChatGPT)",
7495
- description: "GPT-5.3 Codex Spark (high reasoning) via ChatGPT Plus/Pro",
7496
- updateArgs: {
7497
- reasoning_effort: "high",
7498
- verbosity: "low",
7499
- context_window: 128000,
7500
- max_output_tokens: 128000,
7501
- parallel_tool_calls: true
7502
- }
7503
- },
7504
- {
7505
- id: "gpt-5.3-codex-spark-plus-pro-xhigh",
7506
- handle: "chatgpt-plus-pro/gpt-5.3-codex-spark",
7507
- label: "GPT-5.3 Codex Spark (ChatGPT)",
7508
- description: "GPT-5.3 Codex Spark (max reasoning) via ChatGPT Plus/Pro",
7509
- updateArgs: {
7510
- reasoning_effort: "xhigh",
7511
- verbosity: "low",
7512
- context_window: 128000,
7513
- max_output_tokens: 128000,
7514
- parallel_tool_calls: true
7515
- }
7516
- },
7517
- {
7518
- id: "gpt-5.5-none",
7519
- handle: "openai/gpt-5.5",
7520
- label: "GPT-5.5",
7521
- description: "OpenAI's most capable model (no reasoning)",
7522
- updateArgs: {
7523
- reasoning_effort: "none",
7524
- verbosity: "medium",
7525
- context_window: 272000,
7526
- max_output_tokens: 128000,
7527
- parallel_tool_calls: true
7528
- }
7529
- },
7530
- {
7531
- id: "gpt-5.5-low",
7532
- handle: "openai/gpt-5.5",
7533
- label: "GPT-5.5",
7534
- description: "OpenAI's most capable model (low reasoning)",
7535
- updateArgs: {
7536
- reasoning_effort: "low",
7537
- verbosity: "medium",
7538
- context_window: 272000,
7539
- max_output_tokens: 128000,
7540
- parallel_tool_calls: true
7541
- }
7542
- },
7543
- {
7544
- id: "gpt-5.5-medium",
7545
- handle: "openai/gpt-5.5",
7546
- label: "GPT-5.5",
7547
- description: "OpenAI's most capable model (med reasoning)",
7548
- updateArgs: {
7549
- reasoning_effort: "medium",
7550
- verbosity: "medium",
7551
- context_window: 272000,
7552
- max_output_tokens: 128000,
7553
- parallel_tool_calls: true
7554
- }
7555
- },
7556
- {
7557
- id: "gpt-5.5-high",
7558
- handle: "openai/gpt-5.5",
7559
- label: "GPT-5.5",
7560
- description: "OpenAI's most capable model (high reasoning)",
7561
- updateArgs: {
7562
- reasoning_effort: "high",
7563
- verbosity: "medium",
7564
- context_window: 272000,
7565
- max_output_tokens: 128000,
7566
- parallel_tool_calls: true
7567
- }
7568
- },
7569
- {
7570
- id: "gpt-5.5-xhigh",
7571
- handle: "openai/gpt-5.5",
7572
- label: "GPT-5.5",
7573
- description: "OpenAI's most capable model (max reasoning)",
7574
- updateArgs: {
7575
- reasoning_effort: "xhigh",
7576
- verbosity: "medium",
7577
- context_window: 272000,
7578
- max_output_tokens: 128000,
7579
- parallel_tool_calls: true
7580
- }
7581
- },
7582
- {
7583
- id: "gpt-5.4-none",
7584
- handle: "openai/gpt-5.4",
7585
- label: "GPT-5.4",
7586
- description: "OpenAI's most capable model (no reasoning)",
7587
- updateArgs: {
7588
- reasoning_effort: "none",
7589
- verbosity: "medium",
7590
- context_window: 272000,
7591
- max_output_tokens: 128000,
7592
- parallel_tool_calls: true
7593
- }
7594
- },
7595
- {
7596
- id: "gpt-5.4-low",
7597
- handle: "openai/gpt-5.4",
7598
- label: "GPT-5.4",
7599
- description: "OpenAI's most capable model (low reasoning)",
7600
- updateArgs: {
7601
- reasoning_effort: "low",
7602
- verbosity: "medium",
7603
- context_window: 272000,
7604
- max_output_tokens: 128000,
7605
- parallel_tool_calls: true
7606
- }
7607
- },
7608
- {
7609
- id: "gpt-5.4-medium",
7610
- handle: "openai/gpt-5.4",
7611
- label: "GPT-5.4",
7612
- description: "OpenAI's most capable model (med reasoning)",
7613
- updateArgs: {
7614
- reasoning_effort: "medium",
7615
- verbosity: "medium",
7616
- context_window: 272000,
7617
- max_output_tokens: 128000,
7618
- parallel_tool_calls: true
7619
- }
7620
- },
7621
- {
7622
- id: "gpt-5.4-high",
7623
- handle: "openai/gpt-5.4",
7624
- label: "GPT-5.4",
7625
- description: "OpenAI's most capable model (high reasoning)",
7626
- updateArgs: {
7627
- reasoning_effort: "high",
7628
- verbosity: "medium",
7629
- context_window: 272000,
7630
- max_output_tokens: 128000,
7631
- parallel_tool_calls: true
7632
- }
7633
- },
7634
- {
7635
- id: "gpt-5.4-xhigh",
7636
- handle: "openai/gpt-5.4",
7637
- label: "GPT-5.4",
7638
- description: "OpenAI's most capable model (max reasoning)",
7639
- updateArgs: {
7640
- reasoning_effort: "xhigh",
7641
- verbosity: "medium",
7642
- context_window: 272000,
7643
- max_output_tokens: 128000,
7644
- parallel_tool_calls: true
7645
- }
7646
- },
7647
- {
7648
- id: "gpt-5.4-fast-none",
7649
- handle: "openai/gpt-5.4-fast",
7650
- label: "GPT-5.4 Fast",
7651
- description: "GPT-5.4 with priority service tier (no reasoning)",
7652
- updateArgs: {
7653
- reasoning_effort: "none",
7654
- verbosity: "medium",
7655
- context_window: 272000,
7656
- max_output_tokens: 128000,
7657
- parallel_tool_calls: true
7658
- }
7659
- },
7660
- {
7661
- id: "gpt-5.4-fast-low",
7662
- handle: "openai/gpt-5.4-fast",
7663
- label: "GPT-5.4 Fast",
7664
- description: "GPT-5.4 with priority service tier (low reasoning)",
7665
- updateArgs: {
7666
- reasoning_effort: "low",
7667
- verbosity: "medium",
7668
- context_window: 272000,
7669
- max_output_tokens: 128000,
7670
- parallel_tool_calls: true
7671
- }
7672
- },
7673
- {
7674
- id: "gpt-5.4-fast-medium",
7675
- handle: "openai/gpt-5.4-fast",
7676
- label: "GPT-5.4 Fast",
7677
- description: "GPT-5.4 with priority service tier (med reasoning)",
7678
- updateArgs: {
7679
- reasoning_effort: "medium",
7680
- verbosity: "medium",
7681
- context_window: 272000,
7682
- max_output_tokens: 128000,
7683
- parallel_tool_calls: true
7684
- }
7685
- },
7686
- {
7687
- id: "gpt-5.4-fast-high",
7688
- handle: "openai/gpt-5.4-fast",
7689
- label: "GPT-5.4 Fast",
7690
- description: "GPT-5.4 with priority service tier (high reasoning)",
7691
- updateArgs: {
7692
- reasoning_effort: "high",
7693
- verbosity: "medium",
7694
- context_window: 272000,
7695
- max_output_tokens: 128000,
7696
- parallel_tool_calls: true
7697
- }
7698
- },
7699
- {
7700
- id: "gpt-5.4-fast-xhigh",
7701
- handle: "openai/gpt-5.4-fast",
7702
- label: "GPT-5.4 Fast",
7703
- description: "GPT-5.4 with priority service tier (max reasoning)",
7704
- updateArgs: {
7705
- reasoning_effort: "xhigh",
7706
- verbosity: "medium",
7707
- context_window: 272000,
7708
- max_output_tokens: 128000,
7709
- parallel_tool_calls: true
7710
- }
7711
- },
7712
- {
7713
- id: "gpt-5.4-mini-none",
7714
- handle: "openai/gpt-5.4-mini",
7715
- label: "GPT-5.4 Mini",
7716
- description: "Fast, efficient GPT-5.4 variant (no reasoning)",
7717
- updateArgs: {
7718
- reasoning_effort: "none",
7719
- verbosity: "low",
7720
- context_window: 272000,
7721
- max_output_tokens: 128000,
7722
- parallel_tool_calls: true
7723
- }
7724
- },
7725
- {
7726
- id: "gpt-5.4-mini-low",
7727
- handle: "openai/gpt-5.4-mini",
7728
- label: "GPT-5.4 Mini",
7729
- description: "Fast, efficient GPT-5.4 variant (low reasoning)",
7730
- updateArgs: {
7731
- reasoning_effort: "low",
7732
- verbosity: "low",
7733
- context_window: 272000,
7734
- max_output_tokens: 128000,
7735
- parallel_tool_calls: true
7736
- }
7737
- },
7738
- {
7739
- id: "gpt-5.4-mini-medium",
7740
- handle: "openai/gpt-5.4-mini",
7741
- label: "GPT-5.4 Mini",
7742
- description: "Fast, efficient GPT-5.4 variant (med reasoning)",
7743
- updateArgs: {
7744
- reasoning_effort: "medium",
7745
- verbosity: "low",
7746
- context_window: 272000,
7747
- max_output_tokens: 128000,
7748
- parallel_tool_calls: true
7749
- }
7750
- },
7751
- {
7752
- id: "gpt-5.4-mini-high",
7753
- handle: "openai/gpt-5.4-mini",
7754
- label: "GPT-5.4 Mini",
7755
- description: "Fast, efficient GPT-5.4 variant (high reasoning)",
7756
- updateArgs: {
7757
- reasoning_effort: "high",
7758
- verbosity: "low",
7759
- context_window: 272000,
7760
- max_output_tokens: 128000,
7761
- parallel_tool_calls: true
5497
+ content: source_claude_default
5498
+ },
5499
+ {
5500
+ id: "source-codex",
5501
+ label: "Codex",
5502
+ description: "Source-faithful OpenAI Codex prompt (for benchmarking)",
5503
+ content: source_codex_default
5504
+ },
5505
+ {
5506
+ id: "source-gemini",
5507
+ label: "Gemini CLI",
5508
+ description: "Source-faithful Gemini CLI prompt (for benchmarking)",
5509
+ content: source_gemini_default
5510
+ }
5511
+ ];
5512
+ function buildSystemPrompt(presetId, memoryMode) {
5513
+ const preset = SYSTEM_PROMPTS.find((p) => p.id === presetId);
5514
+ if (!preset) {
5515
+ throw new Error(`Unknown preset "${presetId}" — cannot rebuild system prompt`);
5516
+ }
5517
+ if (memoryMode === "local-memfs") {
5518
+ return (preset.localMemfsContent ?? preset.memfsContent ?? preset.content).trim();
5519
+ }
5520
+ if (memoryMode === "memfs") {
5521
+ return (preset.memfsContent ?? preset.content).trim();
5522
+ }
5523
+ return preset.content.trim();
5524
+ }
5525
+ var MEMORY_BLOCK_LABELS = ["persona", "human"];
5526
+ function parseMdxFrontmatter(content) {
5527
+ const frontmatterRegex = /^---\n([\s\S]*?)\n---\n([\s\S]*)$/;
5528
+ const match = content.match(frontmatterRegex);
5529
+ if (!match || !match[1] || !match[2]) {
5530
+ return { frontmatter: {}, body: content };
5531
+ }
5532
+ const frontmatterText = match[1];
5533
+ const body = match[2];
5534
+ const frontmatter = {};
5535
+ for (const line of frontmatterText.split(`
5536
+ `)) {
5537
+ const colonIndex = line.indexOf(":");
5538
+ if (colonIndex > 0) {
5539
+ const key = line.slice(0, colonIndex).trim();
5540
+ const value = line.slice(colonIndex + 1).trim();
5541
+ frontmatter[key] = value;
5542
+ }
5543
+ }
5544
+ return { frontmatter, body: body.trim() };
5545
+ }
5546
+ async function loadMemoryBlocksFromMdx() {
5547
+ const memoryBlocks = [];
5548
+ const mdxFiles = MEMORY_BLOCK_LABELS.map((label) => `${label}.mdx`);
5549
+ for (const filename of mdxFiles) {
5550
+ try {
5551
+ const content = MEMORY_PROMPTS[filename];
5552
+ if (!content) {
5553
+ console.warn(`Missing embedded prompt file: ${filename}`);
5554
+ continue;
7762
5555
  }
7763
- },
7764
- {
7765
- id: "gpt-5.4-mini-xhigh",
7766
- handle: "openai/gpt-5.4-mini",
7767
- label: "GPT-5.4 Mini",
7768
- description: "Fast, efficient GPT-5.4 variant (max reasoning)",
7769
- updateArgs: {
7770
- reasoning_effort: "xhigh",
7771
- verbosity: "low",
7772
- context_window: 272000,
7773
- max_output_tokens: 128000,
7774
- parallel_tool_calls: true
5556
+ const { frontmatter, body } = parseMdxFrontmatter(content);
5557
+ const label = frontmatter.label || filename.replace(".mdx", "");
5558
+ const block = {
5559
+ label,
5560
+ value: body
5561
+ };
5562
+ if (frontmatter.description) {
5563
+ block.description = frontmatter.description;
7775
5564
  }
7776
- },
7777
- {
7778
- id: "gpt-5.3-codex-none",
7779
- handle: "openai/gpt-5.3-codex",
7780
- label: "GPT-5.3-Codex",
7781
- description: "GPT-5.3 variant (no reasoning) optimized for coding",
7782
- updateArgs: {
7783
- reasoning_effort: "none",
7784
- verbosity: "medium",
7785
- context_window: 272000,
7786
- max_output_tokens: 128000,
7787
- parallel_tool_calls: true
5565
+ if (READ_ONLY_BLOCK_LABELS.includes(label)) {
5566
+ block.read_only = true;
7788
5567
  }
7789
- },
7790
- {
7791
- id: "gpt-5.3-codex-low",
7792
- handle: "openai/gpt-5.3-codex",
7793
- label: "GPT-5.3-Codex",
7794
- description: "GPT-5.3 variant (low reasoning) optimized for coding",
5568
+ memoryBlocks.push(block);
5569
+ } catch (error) {
5570
+ console.error(`Error loading ${filename}:`, error);
5571
+ }
5572
+ }
5573
+ return memoryBlocks;
5574
+ }
5575
+ var cachedMemoryBlocks = null;
5576
+ async function getDefaultMemoryBlocks() {
5577
+ if (!cachedMemoryBlocks) {
5578
+ cachedMemoryBlocks = await loadMemoryBlocksFromMdx();
5579
+ }
5580
+ return cachedMemoryBlocks;
5581
+ }
5582
+ var models = [];
5583
+ var BUILTIN_MODEL_ALIASES = new Map([
5584
+ ["auto", "letta/auto"],
5585
+ ["auto-chat", "letta/auto-chat"],
5586
+ ["auto-fast", "letta/auto-fast"]
5587
+ ]);
5588
+ function resolveEstablishedCliAlias(modelIdentifier) {
5589
+ if (modelIdentifier === "haiku") {
5590
+ return models.find((model) => model.handle.includes("claude-haiku-4-5")) ?? null;
5591
+ }
5592
+ if (modelIdentifier === "sonnet-4.6-low") {
5593
+ const matchingModels = models.filter((model) => model.handle.includes("claude-sonnet-4-6"));
5594
+ const lowEffortModel = matchingModels.find((model) => model.updateArgs?.reasoning_effort === "low");
5595
+ if (lowEffortModel)
5596
+ return lowEffortModel;
5597
+ const baseModel = matchingModels[0];
5598
+ return baseModel ? {
5599
+ ...baseModel,
5600
+ id: modelIdentifier,
7795
5601
  updateArgs: {
5602
+ ...baseModel.updateArgs,
7796
5603
  reasoning_effort: "low",
7797
- verbosity: "medium",
7798
- context_window: 272000,
7799
- max_output_tokens: 128000,
7800
- parallel_tool_calls: true
7801
- }
7802
- },
7803
- {
7804
- id: "gpt-5.3-codex-medium",
7805
- handle: "openai/gpt-5.3-codex",
7806
- label: "GPT-5.3-Codex",
7807
- description: "GPT-5.3 variant (med reasoning) optimized for coding",
7808
- updateArgs: {
7809
- reasoning_effort: "medium",
7810
- verbosity: "medium",
7811
- context_window: 272000,
7812
- max_output_tokens: 128000,
7813
- parallel_tool_calls: true
7814
- }
7815
- },
7816
- {
7817
- id: "gpt-5.3-codex-high",
7818
- handle: "openai/gpt-5.3-codex",
7819
- label: "GPT-5.3-Codex",
7820
- description: "OpenAI's best coding model (high reasoning)",
7821
- updateArgs: {
7822
- reasoning_effort: "high",
7823
- verbosity: "medium",
7824
- context_window: 272000,
7825
- max_output_tokens: 128000,
7826
- parallel_tool_calls: true
7827
- }
7828
- },
7829
- {
7830
- id: "gpt-5.3-codex-xhigh",
7831
- handle: "openai/gpt-5.3-codex",
7832
- label: "GPT-5.3-Codex",
7833
- description: "GPT-5.3 variant (max reasoning) optimized for coding",
7834
- updateArgs: {
7835
- reasoning_effort: "xhigh",
7836
- verbosity: "medium",
7837
- context_window: 272000,
7838
- max_output_tokens: 128000,
7839
- parallel_tool_calls: true
7840
- }
7841
- },
7842
- {
7843
- id: "grok-4.5",
7844
- handle: "xai/grok-4.5",
7845
- label: "Grok 4.5",
7846
- description: "xAI's Grok 4.5 model via the direct xAI API",
7847
- isFeatured: true,
7848
- updateArgs: {
7849
- context_window: 500000,
7850
- max_output_tokens: 16384,
7851
- parallel_tool_calls: true
7852
- }
7853
- },
7854
- {
7855
- id: "glm-5.2",
7856
- handle: "zai/glm-5.2",
7857
- label: "GLM-5.2",
7858
- description: "zAI's latest reasoning and coding model with 1M context",
7859
- isFeatured: true,
7860
- free: true,
7861
- updateArgs: {
7862
- context_window: 1e6,
7863
- max_output_tokens: 131072,
7864
- parallel_tool_calls: true
7865
- }
7866
- },
7867
- {
7868
- id: "glm-5.1",
7869
- handle: "zai/glm-5.1",
7870
- label: "GLM-5.1",
7871
- description: "zAI's coding model",
7872
- isFeatured: false,
7873
- free: true,
7874
- updateArgs: {
7875
- context_window: 180000,
7876
- max_output_tokens: 16000,
7877
- parallel_tool_calls: true
7878
- }
7879
- },
7880
- {
7881
- id: "minimax-m3",
7882
- handle: "minimax/MiniMax-M3",
7883
- label: "MiniMax M3",
7884
- description: "MiniMax's frontier M-series model for agentic reasoning, tool use, coding, multimodal chat input, and long-context tasks",
7885
- isFeatured: true,
7886
- updateArgs: {
7887
- context_window: 500000,
7888
- parallel_tool_calls: true
7889
- }
7890
- },
7891
- {
7892
- id: "minimax-m2.7",
7893
- handle: "minimax/MiniMax-M2.7",
7894
- label: "MiniMax 2.7",
7895
- description: "MiniMax's M2.7 coding model",
7896
- free: true,
7897
- updateArgs: {
7898
- context_window: 160000,
7899
- max_output_tokens: 64000,
7900
- parallel_tool_calls: true
7901
- }
7902
- },
7903
- {
7904
- id: "kimi-k3",
7905
- handle: "moonshot/kimi-k3",
7906
- label: "Kimi K3",
7907
- description: "Moonshot AI's Kimi K3 model for long-context agentic coding and reasoning tasks",
7908
- isFeatured: true,
7909
- updateArgs: {
7910
- context_window: 1048576,
7911
- max_output_tokens: 131072,
7912
- parallel_tool_calls: true
7913
- }
7914
- },
7915
- {
7916
- id: "gemini-3.1",
7917
- handle: "google_ai/gemini-3.1-pro-preview",
7918
- label: "Gemini 3.1 Pro",
7919
- description: "Google's latest and smartest model",
7920
- isFeatured: true,
7921
- updateArgs: {
7922
- context_window: 180000,
7923
- temperature: 1,
7924
- parallel_tool_calls: true
7925
- }
7926
- },
7927
- {
7928
- id: "gemini-3.5-flash",
7929
- handle: "google_ai/gemini-3.5-flash",
7930
- label: "Gemini 3.5 Flash",
7931
- description: "Google's Gemini 3.5 Flash model",
7932
- updateArgs: {
7933
- context_window: 1048576,
7934
- temperature: 1,
7935
- parallel_tool_calls: true
7936
- }
7937
- },
7938
- {
7939
- id: "gemini-3.6-flash",
7940
- handle: "google_ai/gemini-3.6-flash",
7941
- label: "Gemini 3.6 Flash",
7942
- description: "Google's Gemini 3.6 Flash model",
7943
- isFeatured: true,
7944
- updateArgs: {
7945
- context_window: 1048576,
7946
- temperature: 1,
7947
- parallel_tool_calls: true
5604
+ enable_reasoner: true
7948
5605
  }
7949
- }
7950
- ]
7951
- };
7952
- var models = models_default.models;
7953
- function resolveModel(modelIdentifier) {
7954
- const byId = models.find((m) => m.id === modelIdentifier);
7955
- if (byId)
7956
- return byId.handle;
7957
- const byHandle = models.find((m) => m.handle === modelIdentifier);
7958
- if (byHandle)
7959
- return byHandle.handle;
7960
- if (modelIdentifier.includes("/")) {
7961
- return modelIdentifier;
5606
+ } : null;
7962
5607
  }
7963
5608
  return null;
7964
5609
  }
5610
+ function resolveCatalogModel(modelIdentifier) {
5611
+ const byId = models.find((model) => model.id === modelIdentifier);
5612
+ if (byId)
5613
+ return byId;
5614
+ const byHandle = models.find((model) => model.handle === modelIdentifier);
5615
+ if (byHandle)
5616
+ return byHandle;
5617
+ const cliAlias = resolveEstablishedCliAlias(modelIdentifier);
5618
+ if (cliAlias)
5619
+ return cliAlias;
5620
+ const matches = models.filter((model) => model.handle.split("/").slice(1).join("/") === modelIdentifier);
5621
+ const matchingHandles = new Set(matches.map((model) => model.handle));
5622
+ return matchingHandles.size === 1 ? matches[0] ?? null : null;
5623
+ }
5624
+ function resolveModel(modelIdentifier) {
5625
+ const entry = resolveCatalogModel(modelIdentifier);
5626
+ if (entry)
5627
+ return entry.handle;
5628
+ const builtinHandle = BUILTIN_MODEL_ALIASES.get(modelIdentifier);
5629
+ if (builtinHandle)
5630
+ return builtinHandle;
5631
+ return modelIdentifier.includes("/") ? modelIdentifier : null;
5632
+ }
7965
5633
  function getDefaultModel() {
7966
- const autoModel = resolveModel("auto");
5634
+ if (models.length === 0)
5635
+ return "letta/auto";
5636
+ const autoModel = models.find((model) => model.id === "auto");
7967
5637
  if (autoModel)
7968
- return autoModel;
7969
- const defaultModel = models.find((m) => m.isDefault);
5638
+ return autoModel.handle;
5639
+ const defaultModel = models.find((model) => model.isDefault);
7970
5640
  if (defaultModel)
7971
5641
  return defaultModel.handle;
7972
5642
  const firstModel = models[0];
7973
5643
  if (!firstModel) {
7974
- throw new Error("No models available in models.json");
5644
+ throw new Error("Model catalog is unavailable.");
7975
5645
  }
7976
5646
  return firstModel.handle;
7977
5647
  }
@@ -8257,8 +5927,15 @@ function assertCreateAgentOptionsSupported(options) {
8257
5927
  throw new Error("App-server createAgent() does not yet support dreaming.behavior overrides.");
8258
5928
  }
8259
5929
  }
8260
- async function createAgentBody(options) {
5930
+ async function createAgentBody(options, resolvedSkills) {
8261
5931
  assertCreateAgentOptionsSupported(options);
5932
+ const skills = resolvedSkills ?? await resolveSkillItems(options.skills);
5933
+ if (skills.length > 0 && options.memfs === false) {
5934
+ throw new Error("createAgent() skills require the memory filesystem; remove memfs: false.");
5935
+ }
5936
+ if (resolvedSkills === undefined && skillsHaveSupportFiles(skills)) {
5937
+ throw new Error("This backend does not yet support skill support files (scripts/, " + "references/). Use the Cloud backend, or pass a skill with only SKILL.md.");
5938
+ }
8262
5939
  let system;
8263
5940
  if (options.systemPrompt !== undefined) {
8264
5941
  if (typeof options.systemPrompt !== "string" || isPresetSystemPrompt(options.systemPrompt)) {
@@ -8284,7 +5961,14 @@ async function createAgentBody(options) {
8284
5961
  if (options.human !== undefined) {
8285
5962
  memoryBlocks.push({ label: "human", value: options.human });
8286
5963
  }
8287
- const hasMemoryConfiguration = options.memory !== undefined || options.persona !== undefined || options.human !== undefined;
5964
+ for (const skill of skills) {
5965
+ memoryBlocks.push({
5966
+ label: `skills/${skill.name}`,
5967
+ value: skill.instructions,
5968
+ description: skill.description
5969
+ });
5970
+ }
5971
+ const hasMemoryConfiguration = options.memory !== undefined || options.persona !== undefined || options.human !== undefined || skills.length > 0;
8288
5972
  return buildCreateAgentRequest({
8289
5973
  personalityId: options.personality,
8290
5974
  name: options.name,
@@ -9272,11 +6956,12 @@ class RemoteTurnCoordinator {
9272
6956
  });
9273
6957
  const success = turn.success !== undefined ? turn.success && !approvalConflict && !isFailureStopReason(stopReason) : !approvalConflict && !isFailureStopReason(stopReason);
9274
6958
  const errorCode = approvalConflict ? "approval_conflict" : turn.errorCode ?? toSdkErrorCode(stopReason);
6959
+ const publicError = errorCode && errorCode !== "error" ? errorCode : turn.detail ?? stopReason ?? "error";
9275
6960
  return {
9276
6961
  type: "result",
9277
6962
  success,
9278
6963
  result: success ? tracker?.assistantText || undefined : undefined,
9279
- error: success ? undefined : errorCode ?? stopReason ?? "error",
6964
+ error: success ? undefined : publicError,
9280
6965
  errorCode: success ? undefined : errorCode ?? "error",
9281
6966
  approvalConflict: approvalConflict || undefined,
9282
6967
  recoverable: approvalConflict ? true : success ? undefined : turn.recoverable ?? false,
@@ -9380,7 +7065,7 @@ class RemoteClientSessionCore {
9380
7065
  this.runtime = init.runtime;
9381
7066
  this._agentId = init.runtime.agent_id;
9382
7067
  this._conversationId = init.runtime.conversation_id;
9383
- this._sessionId = `${init.runtime.agent_id}:${init.runtime.conversation_id}`;
7068
+ this._sessionId = init.runtime.agent_id ? `${init.runtime.agent_id}:${init.runtime.conversation_id}` : init.runtime.conversation_id;
9384
7069
  this._modelSettings = init.modelSettings ?? null;
9385
7070
  this._model = typeof init.model === "string" ? init.model : typeof this._modelSettings?.model === "string" ? this._modelSettings.model : "";
9386
7071
  this.toolNames = init.tools;
@@ -10355,8 +8040,8 @@ class AppServerSession extends RemoteClientSessionCore {
10355
8040
  return {
10356
8041
  controller: new AppServerRuntimeController(client, this.remoteOptions, allowedTools, clientToolset),
10357
8042
  runtime: response.runtime,
10358
- model: typeof response.agent?.model === "string" ? response.agent.model : "",
10359
- modelSettings: objectRecord(response.agent?.model_settings) ?? null,
8043
+ model: typeof response.agent?.model === "string" ? response.agent.model : typeof response.conversation?.model === "string" ? response.conversation.model : "",
8044
+ modelSettings: objectRecord(response.agent?.model_settings) ?? objectRecord(response.conversation?.model_settings) ?? null,
10360
8045
  ...availableTools !== undefined ? { tools: availableTools } : {},
10361
8046
  ...skillSources !== undefined ? { skillSources: [...skillSources] } : {}
10362
8047
  };
@@ -10437,6 +8122,24 @@ class AppServerSession extends RemoteClientSessionCore {
10437
8122
  };
10438
8123
  return command;
10439
8124
  }
8125
+ if (this.mode.kind === "agent-free") {
8126
+ if (this.mode.createConversation) {
8127
+ const create = this.mode.createConversation;
8128
+ command.create_conversation = {
8129
+ body: {
8130
+ model: create.model,
8131
+ system: create.system,
8132
+ ...create.modelSettings !== undefined ? { model_settings: create.modelSettings } : {},
8133
+ ...create.contextWindowLimit !== undefined ? { context_window_limit: create.contextWindowLimit } : {}
8134
+ }
8135
+ };
8136
+ } else if (this.mode.conversationId) {
8137
+ command.conversation_id = this.mode.conversationId;
8138
+ } else {
8139
+ throw new Error("Agent-free sessions require a conversation to create or resume.");
8140
+ }
8141
+ return command;
8142
+ }
10440
8143
  if (this.mode.agentId) {
10441
8144
  command.agent_id = this.mode.agentId;
10442
8145
  if (this.mode.newConversation) {
@@ -10502,6 +8205,20 @@ function cloudModelEntry(raw) {
10502
8205
  function isNotFound(error) {
10503
8206
  return error instanceof APIError && error.status === 404;
10504
8207
  }
8208
+ function asEnqueueMessageResult(body) {
8209
+ if (!body || typeof body !== "object" || Array.isArray(body)) {
8210
+ throw new Error("Cloud enqueue message response was not an object.");
8211
+ }
8212
+ const response = body;
8213
+ if (typeof response.client_message_id !== "string" || typeof response.workflow_id !== "string" || typeof response.super_run_id !== "string") {
8214
+ throw new Error("Cloud enqueue message response did not include client_message_id, workflow_id, and super_run_id.");
8215
+ }
8216
+ return {
8217
+ clientMessageId: response.client_message_id,
8218
+ workflowId: response.workflow_id,
8219
+ superRunId: response.super_run_id
8220
+ };
8221
+ }
10505
8222
  function toOrderRelativeCursors(query) {
10506
8223
  if ((query.order ?? "desc") !== "desc")
10507
8224
  return query;
@@ -10593,6 +8310,28 @@ class CloudManagementTransport {
10593
8310
  const page = await this.client.conversations.messages.list(conversationId, toOrderRelativeCursors(query));
10594
8311
  return { messages: page.items };
10595
8312
  }
8313
+ async enqueueConversationMessage(conversationId, message, options) {
8314
+ const clientMessageId = options.clientMessageId ?? crypto.randomUUID();
8315
+ const settings = {
8316
+ ...options.workingDirectory !== undefined ? { working_directory: options.workingDirectory } : {},
8317
+ ...options.permissionMode !== undefined ? { permission_mode: options.permissionMode } : {}
8318
+ };
8319
+ const body = await this.client.post(`/v1/conversations/${encodeURIComponent(conversationId)}/messages/enqueue`, {
8320
+ body: {
8321
+ ...options.agentId !== undefined ? { agent_id: options.agentId } : {},
8322
+ messages: [
8323
+ {
8324
+ role: "user",
8325
+ content: message,
8326
+ client_message_id: clientMessageId
8327
+ }
8328
+ ],
8329
+ client_message_id: clientMessageId,
8330
+ ...Object.keys(settings).length > 0 ? { settings } : {}
8331
+ }
8332
+ });
8333
+ return asEnqueueMessageResult(body);
8334
+ }
10596
8335
  }
10597
8336
 
10598
8337
  // src/remote.ts
@@ -11120,7 +8859,8 @@ function buildCloudStatusWebSocketUrl(params) {
11120
8859
  throw new Error(`Unsupported cloud apiBaseUrl protocol: ${base.protocol}`);
11121
8860
  }
11122
8861
  base.pathname = `/v1/environments/${encodeURIComponent(params.connectionId)}/status/ws`;
11123
- base.searchParams.set("agentId", params.agentId);
8862
+ if (params.agentId)
8863
+ base.searchParams.set("agentId", params.agentId);
11124
8864
  base.searchParams.set("conversationId", params.conversationId);
11125
8865
  base.searchParams.set("channel", "stream");
11126
8866
  if (params.authMode === "query" && params.apiKey) {
@@ -11151,12 +8891,23 @@ function externalToolsByName(tools) {
11151
8891
  }
11152
8892
  return result;
11153
8893
  }
11154
- async function createCloudAgent(client, agentOptions) {
11155
- const body = await createAgentBody(agentOptions);
8894
+ async function createCloudAgent(client, agentOptions, pushSkillSupportFiles) {
8895
+ const skills = await resolveSkillItems(agentOptions.skills);
8896
+ const hasSupportFiles = skillsHaveSupportFiles(skills);
8897
+ if (hasSupportFiles && pushSkillSupportFiles === undefined) {
8898
+ throw new Error("Skill support files (scripts/, references/) require the Node.js " + "package root; the portable client seeds SKILL.md-only skills.");
8899
+ }
8900
+ const body = await createAgentBody(agentOptions, skills);
11156
8901
  const agent = await client.agents.create(body);
11157
8902
  if (typeof agent.id !== "string" || agent.id.length === 0) {
11158
8903
  throw new Error("Cloud create agent response did not include an agent id.");
11159
8904
  }
8905
+ if (hasSupportFiles && pushSkillSupportFiles) {
8906
+ if (typeof client.apiKey !== "string" || client.apiKey.length === 0) {
8907
+ throw new Error(`Agent ${agent.id} was created, but skill support files need an API ` + "key to push to the agent's memory repo and none is configured.");
8908
+ }
8909
+ await pushSkillSupportFiles({ apiBaseUrl: client.baseURL, apiKey: client.apiKey, agentId: agent.id }, skills);
8910
+ }
11160
8911
  return agent.id;
11161
8912
  }
11162
8913
  function assertCloudSessionOptionsSupported(action, options) {
@@ -11206,7 +8957,9 @@ class CloudEnvironmentSession extends RemoteClientSessionCore {
11206
8957
  this.sandboxLifecycleClosing = false;
11207
8958
  const resolved = await this.resolveRuntime();
11208
8959
  const connection = await this.resolveConnectionForRuntime(resolved.runtime).catch(async (error) => {
11209
- await this.cleanupSessionRepositories(resolved.runtime.agent_id, resolved.runtime.conversation_id);
8960
+ if (resolved.runtime.agent_id) {
8961
+ await this.cleanupSessionRepositories(resolved.runtime.agent_id, resolved.runtime.conversation_id);
8962
+ }
11210
8963
  throw error;
11211
8964
  });
11212
8965
  this.connectionId = connection.connectionId;
@@ -11223,7 +8976,9 @@ class CloudEnvironmentSession extends RemoteClientSessionCore {
11223
8976
  } catch (error) {
11224
8977
  await this.closeMcpBridge();
11225
8978
  await this.cleanupManagedSandbox();
11226
- await this.cleanupSessionRepositories(resolved.runtime.agent_id, resolved.runtime.conversation_id);
8979
+ if (resolved.runtime.agent_id) {
8980
+ await this.cleanupSessionRepositories(resolved.runtime.agent_id, resolved.runtime.conversation_id);
8981
+ }
11227
8982
  throw error;
11228
8983
  }
11229
8984
  }
@@ -11247,8 +9002,8 @@ class CloudEnvironmentSession extends RemoteClientSessionCore {
11247
9002
  requestTimeoutMs: this.cloudOptions.requestTimeoutMs ?? DEFAULT_TURN_TIMEOUT_MS
11248
9003
  }, allowedTools, clientToolset),
11249
9004
  runtime: response.runtime,
11250
- model: typeof response.agent?.model === "string" ? response.agent.model : "",
11251
- modelSettings: response.agent?.model_settings ?? null,
9005
+ model: typeof response.agent?.model === "string" ? response.agent.model : typeof response.conversation?.model === "string" ? response.conversation.model : "",
9006
+ modelSettings: response.agent?.model_settings ?? response.conversation?.model_settings ?? null,
11252
9007
  ...availableTools !== undefined ? { tools: availableTools } : {},
11253
9008
  ...skillSources !== undefined ? { skillSources: [...skillSources] } : {}
11254
9009
  };
@@ -11361,11 +9116,12 @@ class CloudEnvironmentSession extends RemoteClientSessionCore {
11361
9116
  name: SDK_AGENT_ORIGIN,
11362
9117
  title: "Letta Agent SDK"
11363
9118
  },
11364
- agent_id: runtime.agent_id,
11365
9119
  conversation_id: runtime.conversation_id,
11366
9120
  recover_approvals: false,
11367
9121
  force_device_status: true
11368
9122
  };
9123
+ if (runtime.agent_id)
9124
+ command.agent_id = runtime.agent_id;
11369
9125
  const mode = mapPermissionMode(options.permissionMode);
11370
9126
  if (mode)
11371
9127
  command.mode = mode;
@@ -11436,6 +9192,17 @@ class CloudEnvironmentSession extends RemoteClientSessionCore {
11436
9192
  return bridge?.close() ?? Promise.resolve();
11437
9193
  }
11438
9194
  async resolveRuntime() {
9195
+ if (this.cloudMode.kind === "agent-free") {
9196
+ if (!this.cloudMode.conversationId) {
9197
+ throw new Error("Cloud agent-free sessions require a conversation id.");
9198
+ }
9199
+ return {
9200
+ runtime: {
9201
+ agent_id: null,
9202
+ conversation_id: this.cloudMode.conversationId
9203
+ }
9204
+ };
9205
+ }
11439
9206
  let agentId = this.cloudMode.agentId;
11440
9207
  let conversationId = this.cloudMode.conversationId;
11441
9208
  if (!agentId && conversationId) {
@@ -11581,6 +9348,9 @@ class CloudEnvironmentSession extends RemoteClientSessionCore {
11581
9348
  return { connectionId: resolved.connectionId };
11582
9349
  }
11583
9350
  async createManagedSandboxConnection(runtime) {
9351
+ if (!runtime.agent_id) {
9352
+ throw new Error("Agent-free queries require an explicit Cloud computer; managed sandboxes are agent-scoped.");
9353
+ }
11584
9354
  const conversationId = runtime.conversation_id && runtime.conversation_id !== "default" ? runtime.conversation_id : undefined;
11585
9355
  const sandbox = await this.createManagedSandbox(runtime.agent_id, conversationId);
11586
9356
  this.managedSandbox = sandbox;
@@ -11866,10 +9636,53 @@ function createConversationsClient(transport) {
11866
9636
  }
11867
9637
  return await transport().forkConversation(sourceConversationId, conversationForkQuery(options));
11868
9638
  },
11869
- listMessages: (conversationId, options = {}) => transport().listConversationMessages(conversationId, conversationMessagesQuery(options))
9639
+ listMessages: (conversationId, options = {}) => transport().listConversationMessages(conversationId, conversationMessagesQuery(options)),
9640
+ enqueue: async (conversationId, message, options = {}) => {
9641
+ assertNonEmptyId2(conversationId, "conversation id");
9642
+ if (conversationId.trim() === "default" && !options.agentId) {
9643
+ throw new Error('enqueue("default", ...) requires options.agentId to identify the agent.');
9644
+ }
9645
+ if (options.agentId !== undefined) {
9646
+ assertNonEmptyId2(options.agentId, "agent id");
9647
+ }
9648
+ if (options.clientMessageId !== undefined) {
9649
+ assertNonEmptyId2(options.clientMessageId, "client message id");
9650
+ }
9651
+ return await transport().enqueueConversationMessage(conversationId, message, options);
9652
+ }
11870
9653
  };
11871
9654
  }
11872
9655
 
9656
+ // src/query.ts
9657
+ function createQuery(createSession, params) {
9658
+ let session = null;
9659
+ let closed = false;
9660
+ const iterator = async function* runQuery() {
9661
+ try {
9662
+ session = await createSession(params.options);
9663
+ if (closed)
9664
+ return;
9665
+ await session.send(params.prompt);
9666
+ yield* session.stream();
9667
+ } finally {
9668
+ closed = true;
9669
+ session?.close();
9670
+ }
9671
+ }();
9672
+ return Object.assign(iterator, {
9673
+ async interrupt() {
9674
+ await session?.abort();
9675
+ },
9676
+ close() {
9677
+ if (closed)
9678
+ return;
9679
+ closed = true;
9680
+ session?.close();
9681
+ iterator.return();
9682
+ }
9683
+ });
9684
+ }
9685
+
11873
9686
  // src/validation.ts
11874
9687
  var VALID_SKILL_SOURCES = [
11875
9688
  "bundled",
@@ -12095,6 +9908,24 @@ function hasCreateAgentEnvironment(options) {
12095
9908
  function looksLikeConversationId(id) {
12096
9909
  return id.startsWith("conv-") || id.startsWith("local-conv-");
12097
9910
  }
9911
+ function agentFreeSessionOptions(options) {
9912
+ const {
9913
+ system: _system,
9914
+ modelSettings: _modelSettings,
9915
+ contextWindowLimit: _contextWindowLimit,
9916
+ ...sessionOptions
9917
+ } = options;
9918
+ return sessionOptions;
9919
+ }
9920
+ function validateAgentFreeQueryOptions(options) {
9921
+ if (typeof options.model !== "string" || options.model.length === 0) {
9922
+ throw new Error("query() requires a non-empty model.");
9923
+ }
9924
+ if (typeof options.system !== "string") {
9925
+ throw new Error("query() requires a system prompt.");
9926
+ }
9927
+ validateCreateSessionOptions(agentFreeSessionOptions(options));
9928
+ }
12098
9929
 
12099
9930
  class LettaAgentClientBase {
12100
9931
  backend;
@@ -12169,6 +10000,11 @@ class LettaAgentClientBase {
12169
10000
  throw new Error("createAgent() does not accept environment. Set a client default or pass environment to resumeSession()/createSession().");
12170
10001
  }
12171
10002
  validateCreateAgentOptions(options);
10003
+ if (options.skills !== undefined && options.skills.length > 0) {
10004
+ const nodeSupport = this.skillNodeSupport();
10005
+ const skills = await resolveSkillItems(options.skills, nodeSupport?.loadSkillDirectory);
10006
+ options = { ...options, skills };
10007
+ }
12172
10008
  if (this.backend === "remote") {
12173
10009
  const session = new AppServerSession(this.appServerSessionOptions(), {
12174
10010
  kind: "create-agent",
@@ -12176,10 +10012,13 @@ class LettaAgentClientBase {
12176
10012
  });
12177
10013
  const initMsg = await session.initialize();
12178
10014
  session.close();
10015
+ if (!initMsg.agentId) {
10016
+ throw new Error("App Server agent creation did not return an agent id.");
10017
+ }
12179
10018
  return initMsg.agentId;
12180
10019
  }
12181
10020
  if (this.backend === "cloud") {
12182
- return createCloudAgent(this.getCloudClient(), options);
10021
+ return createCloudAgent(this.getCloudClient(), options, this.skillNodeSupport()?.pushSkillSupportFiles);
12183
10022
  }
12184
10023
  return this.createLocalAgent(options);
12185
10024
  }
@@ -12252,6 +10091,50 @@ class LettaAgentClientBase {
12252
10091
  session.close();
12253
10092
  }
12254
10093
  }
10094
+ query(params) {
10095
+ validateAgentFreeQueryOptions(params.options);
10096
+ return createQuery((options) => this.createAgentFreeSession(options), params);
10097
+ }
10098
+ async createAgentFreeSession(options) {
10099
+ validateAgentFreeQueryOptions(options);
10100
+ const sessionOptions = agentFreeSessionOptions(options);
10101
+ this.assertSessionBackend("query", sessionOptions);
10102
+ if (this.backend === "remote") {
10103
+ return new AppServerSession(this.appServerSessionOptions(), {
10104
+ kind: "agent-free",
10105
+ createConversation: {
10106
+ model: options.model,
10107
+ system: options.system,
10108
+ ...options.modelSettings !== undefined ? { modelSettings: options.modelSettings } : {},
10109
+ ...options.contextWindowLimit !== undefined ? { contextWindowLimit: options.contextWindowLimit } : {}
10110
+ },
10111
+ options: sessionOptions
10112
+ });
10113
+ }
10114
+ if (this.backend === "cloud") {
10115
+ const computer = options.computer ?? options.environment ?? this.computer;
10116
+ if (computer === undefined) {
10117
+ throw new Error("Cloud query() requires an explicit computer; managed sandboxes are agent-scoped.");
10118
+ }
10119
+ const conversation = await this.getCloudClient().post("/v1/conversations/ephemeral", {
10120
+ body: {
10121
+ model: options.model,
10122
+ system: options.system,
10123
+ ...options.modelSettings !== undefined ? { model_settings: options.modelSettings } : {},
10124
+ ...options.contextWindowLimit !== undefined ? { context_window_limit: options.contextWindowLimit } : {}
10125
+ }
10126
+ });
10127
+ if (!conversation || typeof conversation !== "object" || typeof conversation.id !== "string") {
10128
+ throw new Error("Cloud ephemeral conversation response did not include a conversation id.");
10129
+ }
10130
+ return new CloudEnvironmentSession(this.cloudOptions(), {
10131
+ kind: "agent-free",
10132
+ conversationId: conversation.id,
10133
+ options: sessionOptions
10134
+ }, this.getCloudClient());
10135
+ }
10136
+ return this.createLocalAgentFreeSession(options, sessionOptions);
10137
+ }
12255
10138
  assertSessionBackend(action, options) {
12256
10139
  if (options.computer !== undefined && options.environment !== undefined) {
12257
10140
  throw new Error(`${action}() cannot specify both computer and deprecated environment.`);
@@ -12316,9 +10199,15 @@ class LettaAgentClientBase {
12316
10199
  createLocalAgent(_options) {
12317
10200
  throw this.localBackendUnavailableError();
12318
10201
  }
10202
+ skillNodeSupport() {
10203
+ return;
10204
+ }
12319
10205
  createLocalSession(_agentId, _options) {
12320
10206
  throw this.localBackendUnavailableError();
12321
10207
  }
10208
+ createLocalAgentFreeSession(_queryOptions, _sessionOptions) {
10209
+ throw this.localBackendUnavailableError();
10210
+ }
12322
10211
  resumeLocalSession(_id, _options) {
12323
10212
  throw this.localBackendUnavailableError();
12324
10213
  }
@@ -12814,7 +10703,7 @@ function buildLocalAppServerArgs(cliPath, options = {}) {
12814
10703
  return [
12815
10704
  cliPath,
12816
10705
  ...options.backend !== undefined ? ["--backend", options.backend] : [],
12817
- "app-server",
10706
+ "server",
12818
10707
  "--listen",
12819
10708
  options.listen ?? DEFAULT_LISTEN_URL
12820
10709
  ];
@@ -12937,8 +10826,97 @@ function createLocalAppServerSession(options, mode) {
12937
10826
  return new AppServerSession(sessionOptions, mode);
12938
10827
  }
12939
10828
 
10829
+ // src/skill-node.ts
10830
+ import { readFile, readdir, stat, mkdtemp, rm, mkdir, writeFile } from "node:fs/promises";
10831
+ import { tmpdir } from "node:os";
10832
+ import { basename as basename3, dirname as dirname5, join as join8, relative, sep } from "node:path";
10833
+ import { execFile } from "node:child_process";
10834
+ import { promisify } from "node:util";
10835
+ var run = promisify(execFile);
10836
+ async function loadSkillDirectory(dirPath) {
10837
+ const dirStat = await stat(dirPath).catch(() => null);
10838
+ if (!dirStat?.isDirectory()) {
10839
+ throw new Error(`Skill path is not a directory: ${dirPath}`);
10840
+ }
10841
+ const skillMd = await readFile(join8(dirPath, "SKILL.md"), "utf-8").catch(() => null);
10842
+ if (skillMd === null) {
10843
+ throw new Error(`Skill directory has no SKILL.md: ${dirPath}`);
10844
+ }
10845
+ const parsed = parseSkillMarkdown(skillMd);
10846
+ const name = parsed.name ?? basename3(dirPath);
10847
+ assertValidSkillName(name);
10848
+ if (!parsed.description) {
10849
+ throw new Error(`SKILL.md in ${dirPath} has no frontmatter description. ` + `The description is the skill's trigger text; it is required.`);
10850
+ }
10851
+ const files = {};
10852
+ const walk = async (current) => {
10853
+ for (const entry of await readdir(current, { withFileTypes: true })) {
10854
+ const full = join8(current, entry.name);
10855
+ if (entry.isDirectory()) {
10856
+ await walk(full);
10857
+ } else if (entry.isFile()) {
10858
+ const rel = relative(dirPath, full).split(sep).join("/");
10859
+ if (rel === "SKILL.md")
10860
+ continue;
10861
+ files[rel] = new Uint8Array(await readFile(full));
10862
+ }
10863
+ }
10864
+ };
10865
+ await walk(dirPath);
10866
+ return {
10867
+ name,
10868
+ description: parsed.description,
10869
+ instructions: parsed.body.replace(/^\s+/, ""),
10870
+ ...Object.keys(files).length > 0 ? { files } : {}
10871
+ };
10872
+ }
10873
+ async function pushSkillSupportFiles(target, skills) {
10874
+ const entries = skillSupportFileEntries(skills);
10875
+ if (entries.length === 0)
10876
+ return;
10877
+ const base = target.apiBaseUrl.replace(/\/+$/, "");
10878
+ const remote = `${base}/v1/git/${target.agentId}/state.git`;
10879
+ const authHeader = `Authorization: Basic ${Buffer.from(`x:${target.apiKey}`).toString("base64")}`;
10880
+ const gitEnv = {
10881
+ ...process.env,
10882
+ GIT_TERMINAL_PROMPT: "0",
10883
+ GIT_AUTHOR_NAME: "letta-agent-sdk",
10884
+ GIT_AUTHOR_EMAIL: "sdk@letta.com",
10885
+ GIT_COMMITTER_NAME: "letta-agent-sdk",
10886
+ GIT_COMMITTER_EMAIL: "sdk@letta.com"
10887
+ };
10888
+ const git = (args, cwd) => run("git", ["-c", `http.extraHeader=${authHeader}`, ...args], {
10889
+ env: gitEnv,
10890
+ ...cwd ? { cwd } : {}
10891
+ });
10892
+ const work = await mkdtemp(join8(tmpdir(), "letta-skill-seed-"));
10893
+ try {
10894
+ await git(["clone", "--quiet", "--depth", "1", remote, work]);
10895
+ for (const entry of entries) {
10896
+ const filePath = join8(work, entry.path);
10897
+ await mkdir(dirname5(filePath), { recursive: true });
10898
+ await writeFile(filePath, entry.data);
10899
+ }
10900
+ await git(["add", "-A"], work);
10901
+ await git(["commit", "--quiet", "-m", "feat: seed skill support files"], work);
10902
+ try {
10903
+ await git(["push", "--quiet", "origin", "HEAD"], work);
10904
+ } catch {
10905
+ await git(["pull", "--quiet", "--rebase", "origin", "HEAD"], work);
10906
+ await git(["push", "--quiet", "origin", "HEAD"], work);
10907
+ }
10908
+ } catch (error) {
10909
+ throw new Error(`Agent ${target.agentId} was created, but pushing skill support files ` + `to its memory repo failed: ${error instanceof Error ? error.message : String(error)}`);
10910
+ } finally {
10911
+ await rm(work, { recursive: true, force: true });
10912
+ }
10913
+ }
10914
+
12940
10915
  // src/client.ts
12941
10916
  class LettaAgentClient extends LettaAgentClientBase {
10917
+ skillNodeSupport() {
10918
+ return { loadSkillDirectory, pushSkillSupportFiles };
10919
+ }
12942
10920
  createLocalManagementTransport() {
12943
10921
  const localOptions = this.options.appServer;
12944
10922
  return new AppServerManagementTransport({
@@ -12961,6 +10939,9 @@ class LettaAgentClient extends LettaAgentClientBase {
12961
10939
  });
12962
10940
  const initMsg = await session.initialize();
12963
10941
  session.close();
10942
+ if (!initMsg.agentId) {
10943
+ throw new Error("Local App Server agent creation did not return an agent id.");
10944
+ }
12964
10945
  return initMsg.agentId;
12965
10946
  }
12966
10947
  createLocalSession(agentId, options) {
@@ -12972,6 +10953,22 @@ class LettaAgentClient extends LettaAgentClientBase {
12972
10953
  options
12973
10954
  });
12974
10955
  }
10956
+ createLocalAgentFreeSession(queryOptions, sessionOptions) {
10957
+ const localOptions = this.options;
10958
+ if (localOptions.appServer?.url === undefined && (localOptions.appServer?.harnessBackend ?? "local") === "local") {
10959
+ throw new Error('query() requires the API-backed App Server. Set appServer.harnessBackend to "api" or connect to an API-backed remote App Server.');
10960
+ }
10961
+ return createLocalAppServerSession(localOptions.appServer, {
10962
+ kind: "agent-free",
10963
+ createConversation: {
10964
+ model: queryOptions.model,
10965
+ system: queryOptions.system,
10966
+ ...queryOptions.modelSettings !== undefined ? { modelSettings: queryOptions.modelSettings } : {},
10967
+ ...queryOptions.contextWindowLimit !== undefined ? { contextWindowLimit: queryOptions.contextWindowLimit } : {}
10968
+ },
10969
+ options: sessionOptions
10970
+ });
10971
+ }
12975
10972
  resumeLocalSession(id, options) {
12976
10973
  const localOptions = this.options;
12977
10974
  if (looksLikeConversationId2(id)) {
@@ -13041,7 +11038,7 @@ var __export = (target, all) => {
13041
11038
  set: __exportSetter.bind(all, name)
13042
11039
  });
13043
11040
  };
13044
- var __require2 = /* @__PURE__ */ createRequire3(import.meta.url);
11041
+ var __require3 = /* @__PURE__ */ createRequire3(import.meta.url);
13045
11042
  var require_code = __commonJS((exports) => {
13046
11043
  Object.defineProperty(exports, "__esModule", { value: true });
13047
11044
  exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = undefined;
@@ -16498,49 +14495,49 @@ var require_fast_uri = __commonJS((exports, module) => {
16498
14495
  schemelessOptions.skipEscape = true;
16499
14496
  return serialize(resolved, schemelessOptions);
16500
14497
  }
16501
- function resolveComponent(base, relative, options, skipNormalization) {
14498
+ function resolveComponent(base, relative2, options, skipNormalization) {
16502
14499
  const target = {};
16503
14500
  if (!skipNormalization) {
16504
14501
  base = parse5(serialize(base, options), options);
16505
- relative = parse5(serialize(relative, options), options);
14502
+ relative2 = parse5(serialize(relative2, options), options);
16506
14503
  }
16507
14504
  options = options || {};
16508
- if (!options.tolerant && relative.scheme) {
16509
- target.scheme = relative.scheme;
16510
- target.userinfo = relative.userinfo;
16511
- target.host = relative.host;
16512
- target.port = relative.port;
16513
- target.path = removeDotSegments(relative.path || "");
16514
- target.query = relative.query;
14505
+ if (!options.tolerant && relative2.scheme) {
14506
+ target.scheme = relative2.scheme;
14507
+ target.userinfo = relative2.userinfo;
14508
+ target.host = relative2.host;
14509
+ target.port = relative2.port;
14510
+ target.path = removeDotSegments(relative2.path || "");
14511
+ target.query = relative2.query;
16515
14512
  } else {
16516
- if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {
16517
- target.userinfo = relative.userinfo;
16518
- target.host = relative.host;
16519
- target.port = relative.port;
16520
- target.path = removeDotSegments(relative.path || "");
16521
- target.query = relative.query;
14513
+ if (relative2.userinfo !== undefined || relative2.host !== undefined || relative2.port !== undefined) {
14514
+ target.userinfo = relative2.userinfo;
14515
+ target.host = relative2.host;
14516
+ target.port = relative2.port;
14517
+ target.path = removeDotSegments(relative2.path || "");
14518
+ target.query = relative2.query;
16522
14519
  } else {
16523
- if (!relative.path) {
14520
+ if (!relative2.path) {
16524
14521
  target.path = base.path;
16525
- if (relative.query !== undefined) {
16526
- target.query = relative.query;
14522
+ if (relative2.query !== undefined) {
14523
+ target.query = relative2.query;
16527
14524
  } else {
16528
14525
  target.query = base.query;
16529
14526
  }
16530
14527
  } else {
16531
- if (relative.path[0] === "/") {
16532
- target.path = removeDotSegments(relative.path);
14528
+ if (relative2.path[0] === "/") {
14529
+ target.path = removeDotSegments(relative2.path);
16533
14530
  } else {
16534
14531
  if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
16535
- target.path = "/" + relative.path;
14532
+ target.path = "/" + relative2.path;
16536
14533
  } else if (!base.path) {
16537
- target.path = relative.path;
14534
+ target.path = relative2.path;
16538
14535
  } else {
16539
- target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
14536
+ target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative2.path;
16540
14537
  }
16541
14538
  target.path = removeDotSegments(target.path);
16542
14539
  }
16543
- target.query = relative.query;
14540
+ target.query = relative2.query;
16544
14541
  }
16545
14542
  target.userinfo = base.userinfo;
16546
14543
  target.host = base.host;
@@ -16548,7 +14545,7 @@ var require_fast_uri = __commonJS((exports, module) => {
16548
14545
  }
16549
14546
  target.scheme = base.scheme;
16550
14547
  }
16551
- target.fragment = relative.fragment;
14548
+ target.fragment = relative2.fragment;
16552
14549
  return target;
16553
14550
  }
16554
14551
  function equal(uriA, uriB, options) {
@@ -19468,7 +17465,7 @@ var require_dist = __commonJS((exports, module) => {
19468
17465
  var require_windows = __commonJS((exports, module) => {
19469
17466
  module.exports = isexe;
19470
17467
  isexe.sync = sync;
19471
- var fs = __require2("fs");
17468
+ var fs = __require3("fs");
19472
17469
  function checkPathExt(path2, options) {
19473
17470
  var pathext = options.pathExt !== undefined ? options.pathExt : process.env.PATHEXT;
19474
17471
  if (!pathext) {
@@ -19486,15 +17483,15 @@ var require_windows = __commonJS((exports, module) => {
19486
17483
  }
19487
17484
  return false;
19488
17485
  }
19489
- function checkStat(stat, path2, options) {
19490
- if (!stat.isSymbolicLink() && !stat.isFile()) {
17486
+ function checkStat(stat2, path2, options) {
17487
+ if (!stat2.isSymbolicLink() && !stat2.isFile()) {
19491
17488
  return false;
19492
17489
  }
19493
17490
  return checkPathExt(path2, options);
19494
17491
  }
19495
17492
  function isexe(path2, options, cb) {
19496
- fs.stat(path2, function(er, stat) {
19497
- cb(er, er ? false : checkStat(stat, path2, options));
17493
+ fs.stat(path2, function(er, stat2) {
17494
+ cb(er, er ? false : checkStat(stat2, path2, options));
19498
17495
  });
19499
17496
  }
19500
17497
  function sync(path2, options) {
@@ -19504,22 +17501,22 @@ var require_windows = __commonJS((exports, module) => {
19504
17501
  var require_mode = __commonJS((exports, module) => {
19505
17502
  module.exports = isexe;
19506
17503
  isexe.sync = sync;
19507
- var fs = __require2("fs");
17504
+ var fs = __require3("fs");
19508
17505
  function isexe(path2, options, cb) {
19509
- fs.stat(path2, function(er, stat) {
19510
- cb(er, er ? false : checkStat(stat, options));
17506
+ fs.stat(path2, function(er, stat2) {
17507
+ cb(er, er ? false : checkStat(stat2, options));
19511
17508
  });
19512
17509
  }
19513
17510
  function sync(path2, options) {
19514
17511
  return checkStat(fs.statSync(path2), options);
19515
17512
  }
19516
- function checkStat(stat, options) {
19517
- return stat.isFile() && checkMode(stat, options);
17513
+ function checkStat(stat2, options) {
17514
+ return stat2.isFile() && checkMode(stat2, options);
19518
17515
  }
19519
- function checkMode(stat, options) {
19520
- var mod = stat.mode;
19521
- var uid = stat.uid;
19522
- var gid = stat.gid;
17516
+ function checkMode(stat2, options) {
17517
+ var mod = stat2.mode;
17518
+ var uid = stat2.uid;
17519
+ var gid = stat2.gid;
19523
17520
  var myUid = options.uid !== undefined ? options.uid : process.getuid && process.getuid();
19524
17521
  var myGid = options.gid !== undefined ? options.gid : process.getgid && process.getgid();
19525
17522
  var u = parseInt("100", 8);
@@ -19531,7 +17528,7 @@ var require_mode = __commonJS((exports, module) => {
19531
17528
  }
19532
17529
  });
19533
17530
  var require_isexe = __commonJS((exports, module) => {
19534
- var fs = __require2("fs");
17531
+ var fs = __require3("fs");
19535
17532
  var core2;
19536
17533
  if (process.platform === "win32" || global.TESTING_WINDOWS) {
19537
17534
  core2 = require_windows();
@@ -19583,7 +17580,7 @@ var require_isexe = __commonJS((exports, module) => {
19583
17580
  });
19584
17581
  var require_which = __commonJS((exports, module) => {
19585
17582
  var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
19586
- var path2 = __require2("path");
17583
+ var path2 = __require3("path");
19587
17584
  var COLON = isWindows ? ";" : ":";
19588
17585
  var isexe = require_isexe();
19589
17586
  var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
@@ -19683,7 +17680,7 @@ var require_path_key = __commonJS((exports, module) => {
19683
17680
  module.exports.default = pathKey;
19684
17681
  });
19685
17682
  var require_resolveCommand = __commonJS((exports, module) => {
19686
- var path2 = __require2("path");
17683
+ var path2 = __require3("path");
19687
17684
  var which = require_which();
19688
17685
  var getPathKey = require_path_key();
19689
17686
  function resolveCommandAttempt(parsed, withoutPathExt) {
@@ -19756,7 +17753,7 @@ var require_shebang_command = __commonJS((exports, module) => {
19756
17753
  };
19757
17754
  });
19758
17755
  var require_readShebang = __commonJS((exports, module) => {
19759
- var fs = __require2("fs");
17756
+ var fs = __require3("fs");
19760
17757
  var shebangCommand = require_shebang_command();
19761
17758
  function readShebang(command) {
19762
17759
  const size = 150;
@@ -19772,7 +17769,7 @@ var require_readShebang = __commonJS((exports, module) => {
19772
17769
  module.exports = readShebang;
19773
17770
  });
19774
17771
  var require_parse = __commonJS((exports, module) => {
19775
- var path2 = __require2("path");
17772
+ var path2 = __require3("path");
19776
17773
  var resolveCommand = require_resolveCommand();
19777
17774
  var escape2 = require_escape();
19778
17775
  var readShebang = require_readShebang();
@@ -19874,7 +17871,7 @@ var require_enoent = __commonJS((exports, module) => {
19874
17871
  };
19875
17872
  });
19876
17873
  var require_cross_spawn = __commonJS((exports, module) => {
19877
- var cp = __require2("child_process");
17874
+ var cp = __require3("child_process");
19878
17875
  var parse5 = require_parse();
19879
17876
  var enoent = require_enoent();
19880
17877
  function spawn2(command, args, options) {
@@ -19999,10 +17996,10 @@ var require_content_type = __commonJS((exports) => {
19999
17996
  this.type = type;
20000
17997
  }
20001
17998
  });
20002
- var crypto;
20003
- crypto = globalThis.crypto?.webcrypto ?? globalThis.crypto ?? import("node:crypto").then((m) => m.webcrypto);
17999
+ var crypto2;
18000
+ crypto2 = globalThis.crypto?.webcrypto ?? globalThis.crypto ?? import("node:crypto").then((m) => m.webcrypto);
20004
18001
  async function getRandomValues(size) {
20005
- return (await crypto).getRandomValues(new Uint8Array(size));
18002
+ return (await crypto2).getRandomValues(new Uint8Array(size));
20006
18003
  }
20007
18004
  async function random(size) {
20008
18005
  const mask = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~";
@@ -20022,7 +18019,7 @@ async function generateVerifier(length) {
20022
18019
  return await random(length);
20023
18020
  }
20024
18021
  async function generateChallenge(code_verifier) {
20025
- const buffer = await (await crypto).subtle.digest("SHA-256", new TextEncoder().encode(code_verifier));
18022
+ const buffer = await (await crypto2).subtle.digest("SHA-256", new TextEncoder().encode(code_verifier));
20026
18023
  return btoa(String.fromCharCode(...new Uint8Array(buffer))).replace(/\//g, "_").replace(/\+/g, "-").replace(/=/g, "");
20027
18024
  }
20028
18025
  async function pkceChallenge(length) {
@@ -29620,7 +27617,7 @@ class StreamableHTTPClientTransport {
29620
27617
  }
29621
27618
  var DEFAULT_CLIENT_INFO = {
29622
27619
  name: "letta-code",
29623
- version: "0.30.28"
27620
+ version: "0.31.3"
29624
27621
  };
29625
27622
  async function connectMcpServer(config2, options = {}) {
29626
27623
  let client = new Client(options.clientInfo ?? DEFAULT_CLIENT_INFO);
@@ -30487,6 +28484,12 @@ async function prompt(message, agentId, options = {}) {
30487
28484
  session.close();
30488
28485
  }
30489
28486
  }
28487
+ function query(params) {
28488
+ return new LettaAgentClient({
28489
+ backend: "local",
28490
+ appServer: { harnessBackend: "api" }
28491
+ }).query(params);
28492
+ }
30490
28493
  async function listMessagesDirect(agentId, options = {}) {
30491
28494
  const session = new LettaAgentClient().resumeSession(agentId, {
30492
28495
  permissionMode: "unrestricted"
@@ -30537,6 +28540,7 @@ export {
30537
28540
  readStringArrayParam,
30538
28541
  readNumberParam,
30539
28542
  readBooleanParam,
28543
+ query,
30540
28544
  prompt,
30541
28545
  listMessagesDirect,
30542
28546
  jsonResult,
@@ -30554,4 +28558,4 @@ export {
30554
28558
  CloudManagedSandboxExpiredError
30555
28559
  };
30556
28560
 
30557
- //# debugId=1DB15671E78E416164756E2164756E21
28561
+ //# debugId=5D9C8EEF7BFB615A64756E2164756E21