tuxevil-rotator 4.4.4 → 4.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## [4.4.6] - 2026-11-23
6
+
7
+ ### Changed
8
+
9
+ - Update `MODEL_PRICING` and the standalone telemetry receiver mirror with official November 2026 API rates for Gemini 4 (`gemini-4-neon`, `gemini-4-hydrogen`, `gemini-4-carbon`, `gemini-4-argon-disabled` plus family fallbacks), Claude 5.5 (`claude-opus-5-5`, `claude-sonnet-5-5` plus `5-5`/`5.5` family fallbacks), OpenAI Codex (`gpt-6.2-astra`, `gpt-6.2-sol`, `gpt-6.1-sol`, `gpt-6.1-terra`), and Ollama Cloud (`beam`, `deepseek-v4.1-flash:1017`, `hy4`, `inkling-2-small`, `kimi-k3.1-pro`, `mimo-v2.6-flash`, `mimo-v2.6-pro`, `minimax-m3.1-flash`, `muse-spark-open`, and updated `mistral-large-4`).
10
+
11
+ ## [4.4.5] - 2026-11-23
12
+
13
+ ### Fixed
14
+
15
+ - Publish `meta.reasoning_efforts` and `meta.default_reasoning_effort` on Antigravity `effortRouting` aliases and adaptive `-tiered` Gemini models (`thinking_budget: -1`) in `GET /v1/models`, and merge discovered effort controls into OpenCode models that previously only declared `capabilities.reasoning.supported: true`, so OpenCode displays effort variants for Gemini and Claude models.
16
+
5
17
  ## [4.4.4] - 2026-11-21
6
18
 
7
19
  ### Fixed
package/README.md CHANGED
@@ -55,6 +55,8 @@ Originally built as a multi-account rotator for Google Antigravity. It now gener
55
55
 
56
56
  ## Current Model Update
57
57
 
58
+ - **v4.4.6: Model pricing refresh**: Add official November 2026 pricing and family fallbacks for Gemini 4 (`neon`, `hydrogen`, `carbon`, `argon`), Claude 5.5 (`opus`, `sonnet`), OpenAI `gpt-6.1`/`gpt-6.2`, and newly published Ollama Cloud models in both the rotator and standalone telemetry receiver. ([Release notes](https://github.com/tuxevil/tuxevil-rotator/releases/tag/v4.4.6))
59
+ - **v4.4.5: Antigravity reasoning effort metadata**: Publish `meta.reasoning_efforts` and `meta.default_reasoning_effort` for Antigravity `effortRouting` aliases and adaptive `-tiered` Gemini models in `GET /v1/models`, and merge discovered effort controls in the OpenCode discovery plugin so Gemini and Claude models expose effort variants. ([Release notes](https://github.com/tuxevil/tuxevil-rotator/releases/tag/v4.4.5))
58
60
  - **v4.4.4: Gemini image output**: Deliver generated images through OpenAI Chat, OpenAI Responses, and Anthropic Messages, with support for editing an image on a follow-up turn. Native Gemini responses return structured image parts. ([Release notes](https://github.com/tuxevil/tuxevil-rotator/releases/tag/v4.4.4))
59
61
  - **v4.4.3: Account model access and routing visibility**: Enforce provider plan eligibility for direct requests, selection, and retries across Antigravity and Codex. Admission rejections now appear in request history, and cooldown estimates use accounts eligible for the requested model. ([Release notes](https://github.com/tuxevil/tuxevil-rotator/releases/tag/v4.4.3))
60
62
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tuxevil-rotator",
3
- "version": "4.4.4",
3
+ "version": "4.4.6",
4
4
  "description": "Multi-provider, multi-account AI proxy rotator with per-model routing, real-time quota tracking, and infringement detection (Google Antigravity, Ollama Cloud)",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -291,12 +291,22 @@ export default {
291
291
 
292
292
  const toModelInfo = (raw, existingModel) => {
293
293
  const { id, modelDef } = mapModelToOpenCode(raw)
294
+ const existingReasoning = existingModel?.capabilities?.reasoning
295
+ const discoveredReasoning = modelDef.capabilities.reasoning
296
+ const mergedReasoning =
297
+ discoveredReasoning || existingReasoning
298
+ ? { ...(discoveredReasoning ?? {}), ...(existingReasoning ?? {}) }
299
+ : undefined
294
300
  return {
295
301
  ...modelInfoDefault(resolved.providerID, id),
296
302
  ...(existingModel ?? {}),
297
303
  id: makeModelID(id),
298
304
  name: existingModel?.name || modelDef.name,
299
- capabilities: { ...modelDef.capabilities, ...(existingModel?.capabilities ?? {}) },
305
+ capabilities: {
306
+ ...modelDef.capabilities,
307
+ ...(existingModel?.capabilities ?? {}),
308
+ ...(mergedReasoning ? { reasoning: mergedReasoning } : {}),
309
+ },
300
310
  limit: { ...modelDef.limit, ...(existingModel?.limit ?? {}) },
301
311
  ...(modelDef.variants ? { variants: [...new Map([...modelDef.variants, ...(Array.isArray(existingModel?.variants) ? existingModel.variants : [])].map(v => [v.id, v])).values()] } : {}),
302
312
  }
package/src/compat.ts CHANGED
@@ -83,6 +83,7 @@ import {
83
83
  saveResponsesEntry,
84
84
  toolArgumentsToObject,
85
85
  geminiResponsePartToCompat,
86
+ isTieredEffortModel,
86
87
  } from "./providers/google-antigravity/translators.js";
87
88
  import {
88
89
  openAIToOllamaBody,
@@ -2599,20 +2600,53 @@ export interface OpenAIModelCatalogEntry {
2599
2600
  meta: Record<string, unknown>;
2600
2601
  }
2601
2602
 
2603
+ const SCALAR_REASONING_EFFORTS = [
2604
+ "none",
2605
+ "minimal",
2606
+ "low",
2607
+ "medium",
2608
+ "high",
2609
+ "xhigh",
2610
+ "max",
2611
+ ] as const;
2612
+
2613
+ const TIERED_REASONING_EFFORTS = ["low", "medium", "high"] as const;
2614
+
2615
+ function withAdaptiveTieredEfforts(model: CompatModelEntry): CompatModelEntry {
2616
+ if (
2617
+ model.isThinking &&
2618
+ model.thinkingBudget === -1 &&
2619
+ getModelFamily(model.id) !== "claude" &&
2620
+ isTieredEffortModel(model.id)
2621
+ ) {
2622
+ return {
2623
+ ...model,
2624
+ reasoningEfforts: [...TIERED_REASONING_EFFORTS],
2625
+ };
2626
+ }
2627
+ return model;
2628
+ }
2629
+
2602
2630
  function getOpenAIAntigravityModels(
2603
2631
  source: ModelCatalogSource,
2604
2632
  ): CompatModelEntry[] {
2605
2633
  // Effort aliases stand in for their targets, so filter before swapping them.
2606
2634
  const all = getEffectiveAntigravityModels();
2607
- const result = all.filter((model) => isModelServed(source, "google-antigravity", model.id));
2635
+ const result = all
2636
+ .filter((model) => isModelServed(source, "google-antigravity", model.id))
2637
+ .map(withAdaptiveTieredEfforts);
2608
2638
  const rules = getEffortRouting();
2609
2639
  if (!rules || Object.keys(rules).length === 0) {
2610
2640
  return result;
2611
2641
  }
2612
2642
 
2643
+ const servedById = new Map(result.map((model) => [model.id.toLowerCase(), model]));
2613
2644
  const successfulAliases: Array<{
2614
2645
  alias: string;
2615
2646
  representative: CompatModelEntry;
2647
+ isThinking: boolean;
2648
+ reasoningEfforts?: string[];
2649
+ defaultReasoningEffort?: string;
2616
2650
  }> = [];
2617
2651
  const hiddenTargetIds = new Set<string>();
2618
2652
  const successfulAliasNames = new Set<string>();
@@ -2641,9 +2675,7 @@ function getOpenAIAntigravityModels(
2641
2675
  unavailableAliasNames.add(alias.toLowerCase());
2642
2676
  continue;
2643
2677
  }
2644
- const representative = result.find(
2645
- (m) => m.id.toLowerCase() === defaultTargetId.toLowerCase(),
2646
- );
2678
+ const representative = servedById.get(defaultTargetId.toLowerCase());
2647
2679
  if (!representative) {
2648
2680
  // A default target turned off on the Models page hides the alias; only
2649
2681
  // a target missing from the catalog is a configuration problem.
@@ -2654,7 +2686,47 @@ function getOpenAIAntigravityModels(
2654
2686
  }
2655
2687
  continue;
2656
2688
  }
2657
- successfulAliases.push({ alias, representative });
2689
+
2690
+ const servedTargetModels: CompatModelEntry[] = [];
2691
+ const servedEffortSet = new Set<string>();
2692
+ for (const [effortKey, targetId] of Object.entries(rule.targets)) {
2693
+ const target = servedById.get(targetId.toLowerCase());
2694
+ if (!target) continue;
2695
+ if (
2696
+ isRequestOff(source, {
2697
+ catalogModel: alias,
2698
+ model: targetId,
2699
+ providerId: "google-antigravity",
2700
+ })
2701
+ ) {
2702
+ continue;
2703
+ }
2704
+ servedTargetModels.push(target);
2705
+ servedEffortSet.add(effortKey.trim().toLowerCase());
2706
+ }
2707
+ const aliasEfforts = SCALAR_REASONING_EFFORTS.filter((effort) =>
2708
+ servedEffortSet.has(effort),
2709
+ );
2710
+ const aliasIsThinking =
2711
+ representative.isThinking || servedTargetModels.some((model) => model.isThinking);
2712
+ const hasAliasEffortSelector = aliasEfforts.length >= 2;
2713
+ const normalizedDefaultEffort = defaultEffortKey.trim().toLowerCase();
2714
+
2715
+ successfulAliases.push({
2716
+ alias,
2717
+ representative,
2718
+ isThinking: aliasIsThinking,
2719
+ reasoningEfforts: hasAliasEffortSelector
2720
+ ? aliasEfforts
2721
+ : representative.reasoningEfforts,
2722
+ defaultReasoningEffort: hasAliasEffortSelector
2723
+ ? aliasEfforts.includes(
2724
+ normalizedDefaultEffort as (typeof SCALAR_REASONING_EFFORTS)[number],
2725
+ )
2726
+ ? normalizedDefaultEffort
2727
+ : undefined
2728
+ : representative.defaultReasoningEffort,
2729
+ });
2658
2730
  successfulAliasNames.add(alias.toLowerCase());
2659
2731
  for (const targetId of Object.values(rule.targets)) {
2660
2732
  hiddenTargetIds.add(targetId.toLowerCase());
@@ -2668,10 +2740,19 @@ function getOpenAIAntigravityModels(
2668
2740
  !successfulAliasNames.has(m.id.toLowerCase()),
2669
2741
  );
2670
2742
 
2671
- for (const { alias, representative } of successfulAliases) {
2743
+ for (const {
2744
+ alias,
2745
+ representative,
2746
+ isThinking,
2747
+ reasoningEfforts,
2748
+ defaultReasoningEffort,
2749
+ } of successfulAliases) {
2672
2750
  filtered.push({
2673
2751
  ...representative,
2674
2752
  id: alias,
2753
+ isThinking,
2754
+ ...(reasoningEfforts ? { reasoningEfforts } : {}),
2755
+ ...(defaultReasoningEffort ? { defaultReasoningEffort } : {}),
2675
2756
  });
2676
2757
  }
2677
2758
 
@@ -2706,6 +2787,8 @@ export function buildOpenAIModelCatalog(
2706
2787
  thinkingBudget,
2707
2788
  minThinkingBudget,
2708
2789
  isThinking,
2790
+ reasoningEfforts,
2791
+ defaultReasoningEffort,
2709
2792
  }) => ({
2710
2793
  id,
2711
2794
  object: "model",
@@ -2725,6 +2808,16 @@ export function buildOpenAIModelCatalog(
2725
2808
  ...(minThinkingBudget !== undefined
2726
2809
  ? { min_thinking_budget: minThinkingBudget }
2727
2810
  : {}),
2811
+ ...(isThinking && reasoningEfforts && reasoningEfforts.length > 0
2812
+ ? { reasoning_efforts: reasoningEfforts }
2813
+ : {}),
2814
+ ...(isThinking &&
2815
+ reasoningEfforts &&
2816
+ reasoningEfforts.length > 0 &&
2817
+ defaultReasoningEffort &&
2818
+ reasoningEfforts.includes(defaultReasoningEffort)
2819
+ ? { default_reasoning_effort: defaultReasoningEffort }
2820
+ : {}),
2728
2821
  },
2729
2822
  }),
2730
2823
  );
@@ -124,6 +124,8 @@ export interface CompatModelEntry {
124
124
  thinkingBudget: number;
125
125
  minThinkingBudget?: number;
126
126
  isThinking: boolean;
127
+ reasoningEfforts?: string[];
128
+ defaultReasoningEffort?: string;
127
129
  }
128
130
 
129
131
  export function getEffectiveAntigravityModels(): CompatModelEntry[] {
package/src/types.ts CHANGED
@@ -884,10 +884,22 @@ export interface ModelPricing {
884
884
  }
885
885
 
886
886
  // Pricing per 1M tokens (USD) — what these would cost on paid APIs.
887
- // Source audit and estimation limits: docs/model-pricing.md (2026-10-25).
887
+ // Source audit and estimation limits: docs/model-pricing.md (2026-11-23).
888
888
  export const MODEL_PRICING: Record<string, ModelPricing> = {
889
889
  "claude-opus-4-6-thinking": { inputPer1M: 5.0, outputPer1M: 25.0 },
890
890
  "claude-sonnet-4-6": { inputPer1M: 3.0, outputPer1M: 15.0 },
891
+ // Official Anthropic pricing verified 2026-11-23:
892
+ // https://platform.claude.com/docs/en/about-claude/pricing
893
+ "claude-opus-5-5": {
894
+ inputPer1M: 4.0,
895
+ outputPer1M: 20.0,
896
+ cachingPer1M: 0.2,
897
+ },
898
+ "claude-sonnet-5-5": {
899
+ inputPer1M: 2.0,
900
+ outputPer1M: 10.0,
901
+ cachingPer1M: 0.1,
902
+ },
891
903
  "gemini-3.1-pro": { inputPer1M: 2.0, outputPer1M: 12.0 },
892
904
  "gemini-3.1-pro-low": { inputPer1M: 2.0, outputPer1M: 12.0 },
893
905
  "gemini-3.1-pro-high": { inputPer1M: 2.0, outputPer1M: 12.0 },
@@ -937,8 +949,20 @@ export const MODEL_PRICING: Record<string, ModelPricing> = {
937
949
  cachingStoragePer1MPerHour: 0.5,
938
950
  },
939
951
  // Gemini 3.8 Flash — introductory public Gemini API pricing verified
940
- // 2026-10-25. These rates double on 2027-01-01. Antigravity exposes
941
- // separate low/medium/high model ids.
952
+ // 2026-11-23. These rates double on 2027-01-01. Antigravity exposes
953
+ // separate low/medium/high model ids plus effort alias and tiered id.
954
+ "gemini-3.8-flash": {
955
+ inputPer1M: 0.75,
956
+ outputPer1M: 3.75,
957
+ cachingPer1M: 0.075,
958
+ cachingStoragePer1MPerHour: 0.5,
959
+ },
960
+ "gemini-3.8-flash-tiered": {
961
+ inputPer1M: 0.75,
962
+ outputPer1M: 3.75,
963
+ cachingPer1M: 0.075,
964
+ cachingStoragePer1MPerHour: 0.5,
965
+ },
942
966
  "gemini-3.8-flash-low": {
943
967
  inputPer1M: 0.75,
944
968
  outputPer1M: 3.75,
@@ -957,13 +981,23 @@ export const MODEL_PRICING: Record<string, ModelPricing> = {
957
981
  cachingPer1M: 0.075,
958
982
  cachingStoragePer1MPerHour: 0.5,
959
983
  },
960
- // Standard rates through 2026-11-30; then 4/20/0.2. Implicit cache only.
961
- // https://ai.google.dev/gemini-api/docs/pricing (verified 2026-10-25).
984
+ // Gemini 4 Carbon & Argon: standard rates through 2026-11-30; then 4/20/0.2.
985
+ // Implicit cache only. https://ai.google.dev/gemini-api/docs/pricing (verified 2026-11-23).
986
+ "gemini-4-carbon": {
987
+ inputPer1M: 2.0,
988
+ outputPer1M: 10.0,
989
+ cachingPer1M: 0.1,
990
+ },
962
991
  "gemini-4-argon": {
963
992
  inputPer1M: 2.0,
964
993
  outputPer1M: 10.0,
965
994
  cachingPer1M: 0.1,
966
995
  },
996
+ "gemini-4-argon-disabled": {
997
+ inputPer1M: 2.0,
998
+ outputPer1M: 10.0,
999
+ cachingPer1M: 0.1,
1000
+ },
967
1001
  "gemini-4-argon-low": {
968
1002
  inputPer1M: 2.0,
969
1003
  outputPer1M: 10.0,
@@ -979,12 +1013,94 @@ export const MODEL_PRICING: Record<string, ModelPricing> = {
979
1013
  outputPer1M: 10.0,
980
1014
  cachingPer1M: 0.1,
981
1015
  },
1016
+ // Gemini 4 Neon: standard paid tier rates, implicit cache only (verified 2026-11-23).
1017
+ "gemini-4-neon": {
1018
+ inputPer1M: 3.0,
1019
+ outputPer1M: 15.0,
1020
+ cachingPer1M: 0.15,
1021
+ },
1022
+ "gemini-4-neon-low": {
1023
+ inputPer1M: 3.0,
1024
+ outputPer1M: 15.0,
1025
+ cachingPer1M: 0.15,
1026
+ },
1027
+ "gemini-4-neon-medium": {
1028
+ inputPer1M: 3.0,
1029
+ outputPer1M: 15.0,
1030
+ cachingPer1M: 0.15,
1031
+ },
1032
+ "gemini-4-neon-high": {
1033
+ inputPer1M: 3.0,
1034
+ outputPer1M: 15.0,
1035
+ cachingPer1M: 0.15,
1036
+ },
1037
+ "gemini-4-neon-xhigh": {
1038
+ inputPer1M: 3.0,
1039
+ outputPer1M: 15.0,
1040
+ cachingPer1M: 0.15,
1041
+ },
1042
+ // Gemini 4 Hydrogen: standard paid tier rates, implicit cache only (verified 2026-11-23).
1043
+ "gemini-4-hydrogen": {
1044
+ inputPer1M: 1.5,
1045
+ outputPer1M: 7.5,
1046
+ cachingPer1M: 0.075,
1047
+ },
1048
+ "gemini-4-hydrogen-low": {
1049
+ inputPer1M: 1.5,
1050
+ outputPer1M: 7.5,
1051
+ cachingPer1M: 0.075,
1052
+ },
1053
+ "gemini-4-hydrogen-medium": {
1054
+ inputPer1M: 1.5,
1055
+ outputPer1M: 7.5,
1056
+ cachingPer1M: 0.075,
1057
+ },
1058
+ "gemini-4-hydrogen-high": {
1059
+ inputPer1M: 1.5,
1060
+ outputPer1M: 7.5,
1061
+ cachingPer1M: 0.075,
1062
+ },
1063
+ "gemini-4-hydrogen-xhigh": {
1064
+ inputPer1M: 1.5,
1065
+ outputPer1M: 7.5,
1066
+ cachingPer1M: 0.075,
1067
+ },
1068
+ "gemini-4-hydrogen-tiered": {
1069
+ inputPer1M: 1.5,
1070
+ outputPer1M: 7.5,
1071
+ cachingPer1M: 0.075,
1072
+ },
1073
+ "gemini-4-hydrogen-sonar": {
1074
+ inputPer1M: 1.5,
1075
+ outputPer1M: 7.5,
1076
+ cachingPer1M: 0.075,
1077
+ },
982
1078
  "gpt-oss-120b-medium": { inputPer1M: 2.0, outputPer1M: 10.0 },
983
1079
 
984
- // OpenAI Codex API-equivalent standard rates, checked against
985
- // https://developers.openai.com/api/docs/pricing on 2026-10-25.
1080
+ // OpenAI Codex API-equivalent standard short-context rates, checked against
1081
+ // https://developers.openai.com/api/docs/pricing on 2026-11-23.
986
1082
  // Spend logs use aggregate input/output tokens;
987
1083
  // cache rates are metadata and are not applied separately.
1084
+ "gpt-6.2-astra": {
1085
+ inputPer1M: 8.0,
1086
+ outputPer1M: 40.0,
1087
+ cachingPer1M: 0.4,
1088
+ },
1089
+ "gpt-6.2-sol": {
1090
+ inputPer1M: 2.0,
1091
+ outputPer1M: 10.0,
1092
+ cachingPer1M: 0.1,
1093
+ },
1094
+ "gpt-6.1-sol": {
1095
+ inputPer1M: 2.0,
1096
+ outputPer1M: 10.0,
1097
+ cachingPer1M: 0.1,
1098
+ },
1099
+ "gpt-6.1-terra": {
1100
+ inputPer1M: 1.0,
1101
+ outputPer1M: 5.0,
1102
+ cachingPer1M: 0.05,
1103
+ },
988
1104
  "gpt-6-astra": {
989
1105
  inputPer1M: 10.0,
990
1106
  outputPer1M: 50.0,
@@ -1000,7 +1116,7 @@ export const MODEL_PRICING: Record<string, ModelPricing> = {
1000
1116
  outputPer1M: 0.5,
1001
1117
  cachingPer1M: 0.01,
1002
1118
  },
1003
- // Promotional pricing available at least through 2026-11-21.
1119
+ // Promotional pricing available through 2026-11-30.
1004
1120
  "gpt-5.6-sol": {
1005
1121
  inputPer1M: 4.0,
1006
1122
  outputPer1M: 20.0,
@@ -1017,26 +1133,35 @@ export const MODEL_PRICING: Record<string, ModelPricing> = {
1017
1133
  cachingPer1M: 0.02,
1018
1134
  },
1019
1135
 
1020
- // Ollama Cloud standard USD/1M rates, verified 2026-10-25:
1136
+ // Ollama Cloud standard USD/1M rates, verified 2026-11-23:
1021
1137
  // https://ollama.com/pricing. Aggregates do not track cache hits or off-peak
1022
1138
  // billing, so savings represent standard list-price value, not a net saving.
1139
+ "beam": { inputPer1M: 0.125, outputPer1M: 0.40, cachingPer1M: 0.015 },
1023
1140
  "gpt-oss:20b": { inputPer1M: 0.07, outputPer1M: 0.30, cachingPer1M: 0.035 },
1024
1141
  "gpt-oss:120b": { inputPer1M: 0.15, outputPer1M: 0.60, cachingPer1M: 0.014 },
1025
1142
  "deepseek-v4.1-flash": { inputPer1M: 0.30, outputPer1M: 1.20, cachingPer1M: 0.006 },
1143
+ "deepseek-v4.1-flash:1017": { inputPer1M: 0.30, outputPer1M: 1.20, cachingPer1M: 0.006 },
1026
1144
  "deepseek-v4-pro": { inputPer1M: 1.32, outputPer1M: 3.96, cachingPer1M: 0.044 },
1027
1145
  "glm-5.2": { inputPer1M: 1.40, outputPer1M: 4.40, cachingPer1M: 0.26 },
1028
1146
  "glm-5.3": { inputPer1M: 1.40, outputPer1M: 4.40, cachingPer1M: 0.26 },
1029
1147
  "glm-5.3-flash": { inputPer1M: 0.15, outputPer1M: 0.50, cachingPer1M: 0.03 },
1030
1148
  "gemma4": { inputPer1M: 0.14, outputPer1M: 0.40, cachingPer1M: 0.05 },
1031
1149
  "gemma4:31b": { inputPer1M: 0.14, outputPer1M: 0.40, cachingPer1M: 0.05 },
1150
+ "hy4": { inputPer1M: 0.834, outputPer1M: 2.501, cachingPer1M: 0.042 },
1151
+ "inkling-2-small": { inputPer1M: 0.30, outputPer1M: 1.00, cachingPer1M: 0.03 },
1032
1152
  "kimi-k2.6": { inputPer1M: 0.95, outputPer1M: 4.00, cachingPer1M: 0.16 },
1033
1153
  "kimi-k2.7-code": { inputPer1M: 0.95, outputPer1M: 4.00, cachingPer1M: 0.19 },
1034
1154
  "kimi-k3": { inputPer1M: 3.00, outputPer1M: 15.00, cachingPer1M: 0.30 },
1155
+ "kimi-k3.1-pro": { inputPer1M: 2.00, outputPer1M: 10.00, cachingPer1M: 0.20 },
1156
+ "mimo-v2.6-flash": { inputPer1M: 0.14, outputPer1M: 0.28, cachingPer1M: 0.0028 },
1157
+ "mimo-v2.6-pro": { inputPer1M: 0.435, outputPer1M: 0.87, cachingPer1M: 0.0036 },
1035
1158
  "minimax-m2.7": { inputPer1M: 0.30, outputPer1M: 1.20, cachingPer1M: 0.06 },
1036
1159
  "minimax-m3": { inputPer1M: 0.60, outputPer1M: 2.40, cachingPer1M: 0.12 },
1037
- "mistral-large-4": { inputPer1M: 0.68, outputPer1M: 2.09, cachingPer1M: 0.07 },
1160
+ "minimax-m3.1-flash": { inputPer1M: 0.15, outputPer1M: 0.60, cachingPer1M: 0.015 },
1161
+ "mistral-large-4": { inputPer1M: 0.70, outputPer1M: 2.10, cachingPer1M: 0.07 },
1038
1162
  "mistral-large-3": { inputPer1M: 0.50, outputPer1M: 1.50 },
1039
1163
  "mistral-large-3:675b": { inputPer1M: 0.50, outputPer1M: 1.50 },
1164
+ "muse-spark-open": { inputPer1M: 1.25, outputPer1M: 4.25, cachingPer1M: 0.15 },
1040
1165
  "nemotron-3-nano": { inputPer1M: 0.06, outputPer1M: 0.24 },
1041
1166
  "nemotron-3-nano:30b": { inputPer1M: 0.06, outputPer1M: 0.24 },
1042
1167
  "nemotron-3-super": { inputPer1M: 0.015, outputPer1M: 0.60, cachingPer1M: 0.015 },
@@ -1078,12 +1203,30 @@ export function getModelPricing(model: string): ModelPricing | undefined {
1078
1203
  // version checks explicit so an unrelated model containing "flash" cannot
1079
1204
  // inherit Gemini pricing.
1080
1205
  if (lower.includes("claude") && lower.includes("opus")) {
1206
+ if (lower.includes("5-5") || lower.includes("5.5")) {
1207
+ return MODEL_PRICING["claude-opus-5-5"];
1208
+ }
1081
1209
  return MODEL_PRICING["claude-opus-4-6-thinking"];
1082
1210
  }
1083
1211
  if (lower.includes("claude") && lower.includes("sonnet")) {
1212
+ if (lower.includes("5-5") || lower.includes("5.5")) {
1213
+ return MODEL_PRICING["claude-sonnet-5-5"];
1214
+ }
1084
1215
  return MODEL_PRICING["claude-sonnet-4-6"];
1085
1216
  }
1086
1217
  if (lower.includes("gemini")) {
1218
+ if (lower.includes("4-carbon") || lower.includes("4.0-carbon")) {
1219
+ return MODEL_PRICING["gemini-4-carbon"];
1220
+ }
1221
+ if (lower.includes("4-argon") || lower.includes("4.0-argon")) {
1222
+ return MODEL_PRICING["gemini-4-argon"];
1223
+ }
1224
+ if (lower.includes("4-neon") || lower.includes("4.0-neon")) {
1225
+ return MODEL_PRICING["gemini-4-neon"];
1226
+ }
1227
+ if (lower.includes("4-hydrogen") || lower.includes("4.0-hydrogen")) {
1228
+ return MODEL_PRICING["gemini-4-hydrogen"];
1229
+ }
1087
1230
  if (lower.includes("3.8") && lower.includes("flash")) {
1088
1231
  return MODEL_PRICING["gemini-3.8-flash-high"];
1089
1232
  }
@@ -336,6 +336,8 @@ function sanitizeTokensByModel(raw) {
336
336
  const MODEL_PRICING = {
337
337
  "claude-opus-4-6-thinking": { inputPer1M: 5.0, outputPer1M: 25.0 },
338
338
  "claude-sonnet-4-6": { inputPer1M: 3.0, outputPer1M: 15.0 },
339
+ "claude-opus-5-5": { inputPer1M: 4.0, outputPer1M: 20.0, cachingPer1M: 0.2 },
340
+ "claude-sonnet-5-5": { inputPer1M: 2.0, outputPer1M: 10.0, cachingPer1M: 0.1 },
339
341
  "gemini-3.1-pro": { inputPer1M: 2.0, outputPer1M: 12.0 },
340
342
  "gemini-3.1-pro-low": { inputPer1M: 2.0, outputPer1M: 12.0 },
341
343
  "gemini-3.1-pro-high": { inputPer1M: 2.0, outputPer1M: 12.0 },
@@ -345,30 +347,67 @@ const MODEL_PRICING = {
345
347
  "gemini-3.6-flash-medium": { inputPer1M: 0.75, outputPer1M: 3.75, cachingPer1M: 0.075, cachingStoragePer1MPerHour: 0.5 },
346
348
  "gemini-3.6-flash-low": { inputPer1M: 0.75, outputPer1M: 3.75, cachingPer1M: 0.075, cachingStoragePer1MPerHour: 0.5 },
347
349
  "gemini-3.6-flash-tiered": { inputPer1M: 0.75, outputPer1M: 3.75, cachingPer1M: 0.075, cachingStoragePer1MPerHour: 0.5 },
348
- // Gemini introductory pricing: see docs/model-pricing.md (2026-10-25).
350
+ // Gemini introductory pricing: see docs/model-pricing.md (2026-11-23).
349
351
  "gemini-3.7-flash-tiered": { inputPer1M: 0.75, outputPer1M: 3.75, cachingPer1M: 0.075, cachingStoragePer1MPerHour: 0.5 },
350
352
  // Gemini 3.8 Flash uses the same introductory window and doubles on 2027-01-01.
353
+ "gemini-3.8-flash": { inputPer1M: 0.75, outputPer1M: 3.75, cachingPer1M: 0.075, cachingStoragePer1MPerHour: 0.5 },
354
+ "gemini-3.8-flash-tiered": { inputPer1M: 0.75, outputPer1M: 3.75, cachingPer1M: 0.075, cachingStoragePer1MPerHour: 0.5 },
351
355
  "gemini-3.8-flash-low": { inputPer1M: 0.75, outputPer1M: 3.75, cachingPer1M: 0.075, cachingStoragePer1MPerHour: 0.5 },
352
356
  "gemini-3.8-flash-medium": { inputPer1M: 0.75, outputPer1M: 3.75, cachingPer1M: 0.075, cachingStoragePer1MPerHour: 0.5 },
353
357
  "gemini-3.8-flash-high": { inputPer1M: 0.75, outputPer1M: 3.75, cachingPer1M: 0.075, cachingStoragePer1MPerHour: 0.5 },
358
+ "gemini-4-carbon": { inputPer1M: 2.0, outputPer1M: 10.0, cachingPer1M: 0.1 },
359
+ "gemini-4-argon": { inputPer1M: 2.0, outputPer1M: 10.0, cachingPer1M: 0.1 },
360
+ "gemini-4-argon-disabled": { inputPer1M: 2.0, outputPer1M: 10.0, cachingPer1M: 0.1 },
361
+ "gemini-4-argon-low": { inputPer1M: 2.0, outputPer1M: 10.0, cachingPer1M: 0.1 },
362
+ "gemini-4-argon-medium": { inputPer1M: 2.0, outputPer1M: 10.0, cachingPer1M: 0.1 },
363
+ "gemini-4-argon-high": { inputPer1M: 2.0, outputPer1M: 10.0, cachingPer1M: 0.1 },
364
+ "gemini-4-neon": { inputPer1M: 3.0, outputPer1M: 15.0, cachingPer1M: 0.15 },
365
+ "gemini-4-neon-low": { inputPer1M: 3.0, outputPer1M: 15.0, cachingPer1M: 0.15 },
366
+ "gemini-4-neon-medium": { inputPer1M: 3.0, outputPer1M: 15.0, cachingPer1M: 0.15 },
367
+ "gemini-4-neon-high": { inputPer1M: 3.0, outputPer1M: 15.0, cachingPer1M: 0.15 },
368
+ "gemini-4-neon-xhigh": { inputPer1M: 3.0, outputPer1M: 15.0, cachingPer1M: 0.15 },
369
+ "gemini-4-hydrogen": { inputPer1M: 1.5, outputPer1M: 7.5, cachingPer1M: 0.075 },
370
+ "gemini-4-hydrogen-low": { inputPer1M: 1.5, outputPer1M: 7.5, cachingPer1M: 0.075 },
371
+ "gemini-4-hydrogen-medium": { inputPer1M: 1.5, outputPer1M: 7.5, cachingPer1M: 0.075 },
372
+ "gemini-4-hydrogen-high": { inputPer1M: 1.5, outputPer1M: 7.5, cachingPer1M: 0.075 },
373
+ "gemini-4-hydrogen-xhigh": { inputPer1M: 1.5, outputPer1M: 7.5, cachingPer1M: 0.075 },
374
+ "gemini-4-hydrogen-tiered": { inputPer1M: 1.5, outputPer1M: 7.5, cachingPer1M: 0.075 },
375
+ "gemini-4-hydrogen-sonar": { inputPer1M: 1.5, outputPer1M: 7.5, cachingPer1M: 0.075 },
354
376
  "gpt-oss-120b-medium": { inputPer1M: 2.0, outputPer1M: 10.0 },
355
377
 
356
378
  // Ollama Cloud standard-price models — mirrors MODEL_PRICING in src/types.ts
379
+ "beam": { inputPer1M: 0.125, outputPer1M: 0.40, cachingPer1M: 0.015 },
357
380
  "gpt-oss:20b": { inputPer1M: 0.07, outputPer1M: 0.30, cachingPer1M: 0.035 },
358
381
  "gpt-oss:120b": { inputPer1M: 0.15, outputPer1M: 0.60, cachingPer1M: 0.014 },
359
382
  "deepseek-v4-flash:preview": { inputPer1M: 0.14, outputPer1M: 0.28 },
360
383
  "deepseek-v4-flash:0731": { inputPer1M: 0.14, outputPer1M: 0.28, cachingPer1M: 0.0028 },
384
+ "deepseek-v4.1-flash": { inputPer1M: 0.30, outputPer1M: 1.20, cachingPer1M: 0.006 },
385
+ "deepseek-v4.1-flash:1017": { inputPer1M: 0.30, outputPer1M: 1.20, cachingPer1M: 0.006 },
361
386
  "deepseek-v4-pro": { inputPer1M: 1.32, outputPer1M: 3.96, cachingPer1M: 0.044 },
387
+ "deepseek-v4-pro:0813": { inputPer1M: 1.74, outputPer1M: 3.48 },
362
388
  "qwen3.5:397b": { inputPer1M: 0.60, outputPer1M: 3.60 },
363
389
  "glm-5.1": { inputPer1M: 0.80, outputPer1M: 2.56 },
364
390
  "glm-5.2": { inputPer1M: 1.40, outputPer1M: 4.40, cachingPer1M: 0.26 },
391
+ "glm-5.3": { inputPer1M: 1.40, outputPer1M: 4.40, cachingPer1M: 0.26 },
392
+ "glm-5.3-flash": { inputPer1M: 0.15, outputPer1M: 0.50, cachingPer1M: 0.03 },
393
+ "gemma4": { inputPer1M: 0.14, outputPer1M: 0.40, cachingPer1M: 0.05 },
365
394
  "gemma4:31b": { inputPer1M: 0.14, outputPer1M: 0.40, cachingPer1M: 0.05 },
395
+ "hy4": { inputPer1M: 0.834, outputPer1M: 2.501, cachingPer1M: 0.042 },
396
+ "inkling-2-small": { inputPer1M: 0.30, outputPer1M: 1.00, cachingPer1M: 0.03 },
366
397
  "kimi-k2.6": { inputPer1M: 0.95, outputPer1M: 4.00, cachingPer1M: 0.16 },
367
398
  "kimi-k2.7-code": { inputPer1M: 0.95, outputPer1M: 4.00, cachingPer1M: 0.19 },
368
399
  "kimi-k3": { inputPer1M: 3.00, outputPer1M: 15.00, cachingPer1M: 0.30 },
400
+ "kimi-k3.1-pro": { inputPer1M: 2.00, outputPer1M: 10.00, cachingPer1M: 0.20 },
401
+ "mimo-v2.6-flash": { inputPer1M: 0.14, outputPer1M: 0.28, cachingPer1M: 0.0028 },
402
+ "mimo-v2.6-pro": { inputPer1M: 0.435, outputPer1M: 0.87, cachingPer1M: 0.0036 },
369
403
  "minimax-m2.7": { inputPer1M: 0.30, outputPer1M: 1.20, cachingPer1M: 0.06 },
370
404
  "minimax-m3": { inputPer1M: 0.60, outputPer1M: 2.40, cachingPer1M: 0.12 },
405
+ "minimax-m3.1-flash": { inputPer1M: 0.15, outputPer1M: 0.60, cachingPer1M: 0.015 },
406
+ "mistral-large-4": { inputPer1M: 0.70, outputPer1M: 2.10, cachingPer1M: 0.07 },
407
+ "mistral-large-3": { inputPer1M: 0.50, outputPer1M: 1.50 },
371
408
  "mistral-large-3:675b": { inputPer1M: 0.50, outputPer1M: 1.50 },
409
+ "muse-spark-open": { inputPer1M: 1.25, outputPer1M: 4.25, cachingPer1M: 0.15 },
410
+ "nemotron-3-nano": { inputPer1M: 0.06, outputPer1M: 0.24 },
372
411
  "nemotron-3-nano:30b": { inputPer1M: 0.06, outputPer1M: 0.24 },
373
412
  "nemotron-3-super": { inputPer1M: 0.015, outputPer1M: 0.60, cachingPer1M: 0.015 },
374
413
  "nemotron-3-ultra": { inputPer1M: 0.10, outputPer1M: 3.00, cachingPer1M: 0.10 },
@@ -384,31 +423,34 @@ const MODEL_PRICING = {
384
423
  "laguna-s-2.1-free": { inputPer1M: 0.20, outputPer1M: 0.80 },
385
424
 
386
425
  // OpenAI Codex models — mirrors MODEL_PRICING in src/types.ts
387
- "gpt-5.6-sol": { inputPer1M: 4.0, outputPer1M: 20.0, cachingPer1M: 0.40 },
388
- "gpt-5.6-terra": { inputPer1M: 2.0, outputPer1M: 12.0, cachingPer1M: 0.20 },
389
- "gpt-5.6-luna": { inputPer1M: 0.20, outputPer1M: 1.20, cachingPer1M: 0.02 },
390
- "gemini-4-argon": { inputPer1M: 2.0, outputPer1M: 10.0, cachingPer1M: 0.1 },
391
- "gemini-4-argon-low": { inputPer1M: 2.0, outputPer1M: 10.0, cachingPer1M: 0.1 },
392
- "gemini-4-argon-medium": { inputPer1M: 2.0, outputPer1M: 10.0, cachingPer1M: 0.1 },
393
- "gemini-4-argon-high": { inputPer1M: 2.0, outputPer1M: 10.0, cachingPer1M: 0.1 },
426
+ "gpt-6.2-astra": { inputPer1M: 8.0, outputPer1M: 40.0, cachingPer1M: 0.4 },
427
+ "gpt-6.2-sol": { inputPer1M: 2.0, outputPer1M: 10.0, cachingPer1M: 0.1 },
428
+ "gpt-6.1-sol": { inputPer1M: 2.0, outputPer1M: 10.0, cachingPer1M: 0.1 },
429
+ "gpt-6.1-terra": { inputPer1M: 1.0, outputPer1M: 5.0, cachingPer1M: 0.05 },
394
430
  "gpt-6-astra": { inputPer1M: 10.0, outputPer1M: 50.0, cachingPer1M: 1.0 },
395
431
  "gpt-6-sol": { inputPer1M: 2.0, outputPer1M: 10.0, cachingPer1M: 0.2 },
396
432
  "gpt-6-luna": { inputPer1M: 0.1, outputPer1M: 0.5, cachingPer1M: 0.01 },
397
- "deepseek-v4.1-flash": { inputPer1M: 0.30, outputPer1M: 1.20, cachingPer1M: 0.006 },
398
- "glm-5.3": { inputPer1M: 1.40, outputPer1M: 4.40, cachingPer1M: 0.26 },
399
- "glm-5.3-flash": { inputPer1M: 0.15, outputPer1M: 0.50, cachingPer1M: 0.03 },
400
- "gemma4": { inputPer1M: 0.14, outputPer1M: 0.40, cachingPer1M: 0.05 },
401
- "mistral-large-4": { inputPer1M: 0.68, outputPer1M: 2.09, cachingPer1M: 0.07 },
402
- "mistral-large-3": { inputPer1M: 0.50, outputPer1M: 1.50 },
403
- "nemotron-3-nano": { inputPer1M: 0.06, outputPer1M: 0.24 },
404
- "deepseek-v4-pro:0813": { inputPer1M: 1.74, outputPer1M: 3.48 },
433
+ "gpt-5.6-sol": { inputPer1M: 4.0, outputPer1M: 20.0, cachingPer1M: 0.40 },
434
+ "gpt-5.6-terra": { inputPer1M: 2.0, outputPer1M: 12.0, cachingPer1M: 0.20 },
435
+ "gpt-5.6-luna": { inputPer1M: 0.20, outputPer1M: 1.20, cachingPer1M: 0.02 },
405
436
  };
406
437
 
407
438
  function getModelPricing(model) {
408
439
  if (MODEL_PRICING[model]) return MODEL_PRICING[model];
409
440
  const lower = (model || "").toLowerCase();
410
- if (lower.includes("opus")) return MODEL_PRICING["claude-opus-4-6-thinking"];
411
- if (lower.includes("sonnet")) return MODEL_PRICING["claude-sonnet-4-6"];
441
+ if (MODEL_PRICING[lower]) return MODEL_PRICING[lower];
442
+ if (lower.includes("opus")) {
443
+ if (lower.includes("5-5") || lower.includes("5.5")) return MODEL_PRICING["claude-opus-5-5"];
444
+ return MODEL_PRICING["claude-opus-4-6-thinking"];
445
+ }
446
+ if (lower.includes("sonnet")) {
447
+ if (lower.includes("5-5") || lower.includes("5.5")) return MODEL_PRICING["claude-sonnet-5-5"];
448
+ return MODEL_PRICING["claude-sonnet-4-6"];
449
+ }
450
+ if (lower.includes("4-carbon") || lower.includes("4.0-carbon")) return MODEL_PRICING["gemini-4-carbon"];
451
+ if (lower.includes("4-argon") || lower.includes("4.0-argon")) return MODEL_PRICING["gemini-4-argon"];
452
+ if (lower.includes("4-neon") || lower.includes("4.0-neon")) return MODEL_PRICING["gemini-4-neon"];
453
+ if (lower.includes("4-hydrogen") || lower.includes("4.0-hydrogen")) return MODEL_PRICING["gemini-4-hydrogen"];
412
454
  if (lower.includes("3.8-flash")) return MODEL_PRICING["gemini-3.8-flash-high"];
413
455
  if (lower.includes("3.7-flash")) return MODEL_PRICING["gemini-3.7-flash-tiered"];
414
456
  if (lower.includes("3.6-flash")) return MODEL_PRICING["gemini-3.6-flash-high"];