orbit-code-ai 0.1.39 → 0.1.40

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 (2) hide show
  1. package/dist/cli.mjs +73 -30
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -57129,15 +57129,19 @@ function getOpus46CostTier(fastMode) {
57129
57129
  function tokensToUSDCost(modelCosts, usage) {
57130
57130
  return usage.input_tokens / 1e6 * modelCosts.inputTokens + usage.output_tokens / 1e6 * modelCosts.outputTokens + (usage.cache_read_input_tokens ?? 0) / 1e6 * modelCosts.promptCacheReadTokens + (usage.cache_creation_input_tokens ?? 0) / 1e6 * modelCosts.promptCacheWriteTokens + (usage.server_tool_use?.web_search_requests ?? 0) * modelCosts.webSearchRequests;
57131
57131
  }
57132
+ function geminiVersionAtLeast(model, min) {
57133
+ const match = model.toLowerCase().match(/gemini-(\d+\.\d+)/);
57134
+ return match ? Number.parseFloat(match[1]) >= min : false;
57135
+ }
57132
57136
  function getModelCosts(model, usage) {
57133
57137
  const shortName = getCanonicalName(model);
57134
57138
  if (model.toLowerCase().startsWith("gemini")) {
57135
57139
  const lower = model.toLowerCase();
57136
57140
  if (lower.includes("flash-lite") || lower.includes("3.1") && lower.includes("flash")) {
57137
- return COST_GEMINI_31_FLASH_LITE;
57141
+ return lower.includes("lite") && geminiVersionAtLeast(lower, 3.5) ? COST_GEMINI_35_FLASH_LITE : COST_GEMINI_31_FLASH_LITE;
57138
57142
  }
57139
- if (lower.includes("3.5") && lower.includes("flash")) {
57140
- return COST_GEMINI_35_FLASH;
57143
+ if (lower.includes("flash")) {
57144
+ return geminiVersionAtLeast(lower, 3.6) ? COST_GEMINI_36_FLASH : COST_GEMINI_35_FLASH;
57141
57145
  }
57142
57146
  if (lower.includes("pro")) {
57143
57147
  const promptTokens = usage.input_tokens + (usage.cache_read_input_tokens ?? 0) + (usage.cache_creation_input_tokens ?? 0);
@@ -57177,7 +57181,7 @@ function formatPrice(price) {
57177
57181
  function formatModelPricing(costs) {
57178
57182
  return `${formatPrice(costs.inputTokens)}/${formatPrice(costs.outputTokens)} per Mtok`;
57179
57183
  }
57180
- var COST_TIER_3_15, COST_TIER_15_75, COST_TIER_5_25, COST_TIER_30_150, COST_GEMINI_31_PRO, COST_GEMINI_31_PRO_HIGH, COST_GEMINI_31_FLASH_LITE, COST_GEMINI_35_FLASH, COST_HAIKU_35, COST_HAIKU_45, DEFAULT_UNKNOWN_MODEL_COST, MODEL_COSTS;
57184
+ var COST_TIER_3_15, COST_TIER_15_75, COST_TIER_5_25, COST_TIER_30_150, COST_GEMINI_31_PRO, COST_GEMINI_31_PRO_HIGH, COST_GEMINI_31_FLASH_LITE, COST_GEMINI_35_FLASH, COST_GEMINI_36_FLASH, COST_GEMINI_35_FLASH_LITE, COST_HAIKU_35, COST_HAIKU_45, DEFAULT_UNKNOWN_MODEL_COST, MODEL_COSTS;
57181
57185
  var init_modelCost = __esm(() => {
57182
57186
  init_state();
57183
57187
  init_fastMode();
@@ -57239,6 +57243,20 @@ var init_modelCost = __esm(() => {
57239
57243
  promptCacheReadTokens: 0.375,
57240
57244
  webSearchRequests: 0.01
57241
57245
  };
57246
+ COST_GEMINI_36_FLASH = {
57247
+ inputTokens: 1.5,
57248
+ outputTokens: 7.5,
57249
+ promptCacheWriteTokens: 0,
57250
+ promptCacheReadTokens: 0.15,
57251
+ webSearchRequests: 0.01
57252
+ };
57253
+ COST_GEMINI_35_FLASH_LITE = {
57254
+ inputTokens: 0.3,
57255
+ outputTokens: 2.5,
57256
+ promptCacheWriteTokens: 0,
57257
+ promptCacheReadTokens: 0.03,
57258
+ webSearchRequests: 0.01
57259
+ };
57242
57260
  COST_HAIKU_35 = {
57243
57261
  inputTokens: 0.8,
57244
57262
  outputTokens: 4,
@@ -57421,7 +57439,7 @@ function getSmallFastModel() {
57421
57439
  if (process.env.ANTHROPIC_SMALL_FAST_MODEL)
57422
57440
  return process.env.ANTHROPIC_SMALL_FAST_MODEL;
57423
57441
  if (getAPIProvider() === "gemini") {
57424
- return process.env.GEMINI_FAST_MODEL || "gemini-3.1-flash-lite";
57442
+ return process.env.GEMINI_FAST_MODEL || "gemini-3.5-flash-lite";
57425
57443
  }
57426
57444
  if (getAPIProvider() === "openai") {
57427
57445
  return process.env.OPENAI_MODEL || "gpt-4o-mini";
@@ -57485,7 +57503,7 @@ function getDefaultSonnetModel() {
57485
57503
  return process.env.ANTHROPIC_DEFAULT_SONNET_MODEL;
57486
57504
  }
57487
57505
  if (getAPIProvider() === "gemini") {
57488
- return process.env.GEMINI_FLASH_MODEL || "gemini-3.5-flash";
57506
+ return process.env.GEMINI_FLASH_MODEL || "gemini-3.6-flash";
57489
57507
  }
57490
57508
  if (getAPIProvider() === "openai") {
57491
57509
  return process.env.OPENAI_MODEL || "gpt-4o";
@@ -57515,7 +57533,7 @@ function getDefaultHaikuModel() {
57515
57533
  return process.env.OPENAI_MODEL || "github:copilot";
57516
57534
  }
57517
57535
  if (getAPIProvider() === "gemini") {
57518
- return process.env.GEMINI_FAST_MODEL || "gemini-3.1-flash-lite";
57536
+ return process.env.GEMINI_FAST_MODEL || "gemini-3.5-flash-lite";
57519
57537
  }
57520
57538
  return getModelStrings2().haiku45;
57521
57539
  }
@@ -57535,7 +57553,7 @@ function getDefaultMainLoopModelSetting() {
57535
57553
  return settings.model || process.env.OPENAI_MODEL || "github:copilot";
57536
57554
  }
57537
57555
  if (getAPIProvider() === "gemini") {
57538
- return process.env.GEMINI_MODEL || process.env.GEMINI_FAST_MODEL || "gemini-3.1-flash-lite";
57556
+ return process.env.GEMINI_MODEL || process.env.GEMINI_FAST_MODEL || "gemini-3.5-flash-lite";
57539
57557
  }
57540
57558
  if (getAPIProvider() === "openai") {
57541
57559
  return process.env.OPENAI_MODEL || "gpt-4o";
@@ -57686,6 +57704,10 @@ function getPublicModelDisplayName(model) {
57686
57704
  "claude-sonnet-4.5": "Orbit Sonnet 4.5",
57687
57705
  "claude-haiku-4.5": "Orbit Haiku 4.5",
57688
57706
  "gemini-3.1-pro-preview": "Gemini 3.1 Pro Preview",
57707
+ "gemini-3.6-flash": "Gemini 3.6 Flash",
57708
+ "gemini-3.5-flash-lite": "Gemini 3.5 Flash-Lite",
57709
+ "gemini-3.5-flash": "Gemini 3.5 Flash",
57710
+ "gemini-3.1-flash-lite": "Gemini 3.1 Flash-Lite",
57689
57711
  "gemini-3-flash-preview": "Gemini 3 Flash",
57690
57712
  "gemini-2.5-pro": "Gemini 2.5 Pro",
57691
57713
  "grok-code-fast-1": "Grok Code Fast 1"
@@ -57961,6 +57983,8 @@ var init_openaiContextWindows = __esm(() => {
57961
57983
  "google/gemini-2.0-flash": 1048576,
57962
57984
  "google/gemini-2.5-pro": 1048576,
57963
57985
  "gemini-3.1-pro-preview": 1048576,
57986
+ "gemini-3.6-flash": 1048576,
57987
+ "gemini-3.5-flash-lite": 1048576,
57964
57988
  "gemini-3.5-flash": 1048576,
57965
57989
  "gemini-3.1-flash-lite": 1048576,
57966
57990
  "gemini-2.0-flash": 1048576,
@@ -58011,6 +58035,8 @@ var init_openaiContextWindows = __esm(() => {
58011
58035
  "google/gemini-2.0-flash": 8192,
58012
58036
  "google/gemini-2.5-pro": 65536,
58013
58037
  "gemini-3.1-pro-preview": 65536,
58038
+ "gemini-3.6-flash": 65536,
58039
+ "gemini-3.5-flash-lite": 65536,
58014
58040
  "gemini-3.5-flash": 65536,
58015
58041
  "gemini-3.1-flash-lite": 65536,
58016
58042
  "gemini-2.0-flash": 8192,
@@ -83792,7 +83818,7 @@ async function printStartupScreen() {
83792
83818
  const sLen = ` ● ${sL} Ready — type /help to begin`.length;
83793
83819
  out.push(boxRow(sRow, W2, sLen));
83794
83820
  out.push(`${rgb(...BORDER)}╚${"═".repeat(W2 - 2)}╝${RESET}`);
83795
- out.push(` ${DIM}${rgb(...DIMCOL)}orbit-code ${RESET}${rgb(...ACCENT)}v${"0.1.39"}${RESET}`);
83821
+ out.push(` ${DIM}${rgb(...DIMCOL)}orbit-code ${RESET}${rgb(...ACCENT)}v${"0.1.40"}${RESET}`);
83796
83822
  out.push("");
83797
83823
  process.stdout.write(out.join(`
83798
83824
  `) + `
@@ -186106,8 +186132,23 @@ var init_toolArgumentNormalization = __esm(() => {
186106
186132
  // src/services/api/openaiShim.ts
186107
186133
  var exports_openaiShim = {};
186108
186134
  __export(exports_openaiShim, {
186135
+ geminiOmitsSamplingParams: () => geminiOmitsSamplingParams,
186109
186136
  createOpenAIShimClient: () => createOpenAIShimClient
186110
186137
  });
186138
+ function geminiOmitsSamplingParams(model) {
186139
+ const m = model.toLowerCase();
186140
+ if (!m.startsWith("gemini"))
186141
+ return false;
186142
+ const match = m.match(/gemini-(\d+\.\d+)/);
186143
+ if (!match)
186144
+ return false;
186145
+ const version2 = Number.parseFloat(match[1]);
186146
+ if (m.includes("flash-lite"))
186147
+ return version2 >= 3.5;
186148
+ if (m.includes("flash"))
186149
+ return version2 >= 3.6;
186150
+ return false;
186151
+ }
186111
186152
  function isGithubModelsMode() {
186112
186153
  return isEnvTruthy(process.env.ORBIT_CODE_USE_GITHUB);
186113
186154
  }
@@ -186793,10 +186834,12 @@ class OpenAIShimMessages {
186793
186834
  body.max_tokens = body.max_completion_tokens;
186794
186835
  delete body.max_completion_tokens;
186795
186836
  }
186796
- if (params.temperature !== undefined)
186797
- body.temperature = params.temperature;
186798
- if (params.top_p !== undefined)
186799
- body.top_p = params.top_p;
186837
+ if (!geminiOmitsSamplingParams(request.resolvedModel)) {
186838
+ if (params.temperature !== undefined)
186839
+ body.temperature = params.temperature;
186840
+ if (params.top_p !== undefined)
186841
+ body.top_p = params.top_p;
186842
+ }
186800
186843
  if (params.tools && params.tools.length > 0) {
186801
186844
  const converted = convertTools(params.tools);
186802
186845
  if (converted.length > 0) {
@@ -319931,16 +319974,16 @@ function getGeminiModelOptions() {
319931
319974
  descriptionForModel: "Gemini 3.1 Pro - most capable, for complex generative work"
319932
319975
  },
319933
319976
  {
319934
- value: "gemini-3.5-flash",
319935
- label: "Gemini 3.5 Flash",
319936
- description: "Gemini 3.5 Flash · Balanced for everyday tasks",
319937
- descriptionForModel: "Gemini 3.5 Flash - balanced, for everyday tasks"
319977
+ value: "gemini-3.6-flash",
319978
+ label: "Gemini 3.6 Flash",
319979
+ description: "Gemini 3.6 Flash · Balanced for everyday tasks",
319980
+ descriptionForModel: "Gemini 3.6 Flash - balanced, for everyday tasks"
319938
319981
  },
319939
319982
  {
319940
- value: "gemini-3.1-flash-lite",
319941
- label: "Gemini 3.1 Flash-Lite",
319942
- description: "Gemini 3.1 Flash-Lite · Fastest & lowest cost (default)",
319943
- descriptionForModel: "Gemini 3.1 Flash-Lite - fastest and cheapest, for reading/planning"
319983
+ value: "gemini-3.5-flash-lite",
319984
+ label: "Gemini 3.5 Flash-Lite",
319985
+ description: "Gemini 3.5 Flash-Lite · Fastest & lowest cost (default)",
319986
+ descriptionForModel: "Gemini 3.5 Flash-Lite - fastest and cheapest, for reading/planning"
319944
319987
  }
319945
319988
  ];
319946
319989
  }
@@ -334299,7 +334342,7 @@ function getAnthropicEnvMetadata() {
334299
334342
  function getBuildAgeMinutes() {
334300
334343
  if (false)
334301
334344
  ;
334302
- const buildTime = new Date("2026-07-16T10:32:35.333Z").getTime();
334345
+ const buildTime = new Date("2026-07-22T07:54:15.011Z").getTime();
334303
334346
  if (isNaN(buildTime))
334304
334347
  return;
334305
334348
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -358716,7 +358759,7 @@ function buildPrimarySection() {
358716
358759
  }, undefined, false, undefined, this);
358717
358760
  return [{
358718
358761
  label: "Version",
358719
- value: "0.1.39"
358762
+ value: "0.1.40"
358720
358763
  }, {
358721
358764
  label: "Session name",
358722
358765
  value: nameValue
@@ -471025,7 +471068,7 @@ function WelcomeV2() {
471025
471068
  dimColor: true,
471026
471069
  children: [
471027
471070
  "v",
471028
- "0.1.39",
471071
+ "0.1.40",
471029
471072
  " "
471030
471073
  ]
471031
471074
  }, undefined, true, undefined, this)
@@ -471225,7 +471268,7 @@ function WelcomeV2() {
471225
471268
  dimColor: true,
471226
471269
  children: [
471227
471270
  "v",
471228
- "0.1.39",
471271
+ "0.1.40",
471229
471272
  " "
471230
471273
  ]
471231
471274
  }, undefined, true, undefined, this)
@@ -471451,7 +471494,7 @@ function AppleTerminalWelcomeV2(t0) {
471451
471494
  dimColor: true,
471452
471495
  children: [
471453
471496
  "v",
471454
- "0.1.39",
471497
+ "0.1.40",
471455
471498
  " "
471456
471499
  ]
471457
471500
  }, undefined, true, undefined, this);
@@ -471705,7 +471748,7 @@ function AppleTerminalWelcomeV2(t0) {
471705
471748
  dimColor: true,
471706
471749
  children: [
471707
471750
  "v",
471708
- "0.1.39",
471751
+ "0.1.40",
471709
471752
  " "
471710
471753
  ]
471711
471754
  }, undefined, true, undefined, this);
@@ -527714,7 +527757,7 @@ Usage: orbit --remote "your task description"`, () => gracefulShutdown(1));
527714
527757
  pendingHookMessages
527715
527758
  }, renderAndRun);
527716
527759
  }
527717
- }).version("0.1.39 (Orbit AI)", "-v, --version", "Output the version number");
527760
+ }).version("0.1.40 (Orbit AI)", "-v, --version", "Output the version number");
527718
527761
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
527719
527762
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
527720
527763
  if (canUserConfigureAdvisor()) {
@@ -528236,7 +528279,7 @@ if (false) {}
528236
528279
  async function main2() {
528237
528280
  const args = process.argv.slice(2);
528238
528281
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
528239
- console.log(`${"0.1.39"} (Orbit AI)`);
528282
+ console.log(`${"0.1.40"} (Orbit AI)`);
528240
528283
  return;
528241
528284
  }
528242
528285
  if (args.includes("--provider")) {
@@ -528344,4 +528387,4 @@ async function main2() {
528344
528387
  }
528345
528388
  main2();
528346
528389
 
528347
- //# debugId=3DB19D92C131358564756E2164756E21
528390
+ //# debugId=7191C892F3DDD05064756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orbit-code-ai",
3
- "version": "0.1.39",
3
+ "version": "0.1.40",
4
4
  "description": "Orbit AI – Your AI-powered IBM ACE coding companion",
5
5
  "type": "module",
6
6
  "author": "moenawaf",