@codemieai/code 0.15.2 → 0.15.4
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/dist/agents/core/AgentCLI.d.ts.map +1 -1
- package/dist/agents/core/AgentCLI.js +9 -0
- package/dist/agents/core/AgentCLI.js.map +1 -1
- package/dist/agents/core/BaseAgentAdapter.d.ts.map +1 -1
- package/dist/agents/core/BaseAgentAdapter.js +34 -9
- package/dist/agents/core/BaseAgentAdapter.js.map +1 -1
- package/dist/agents/plugins/claude/claude.models.d.ts +58 -0
- package/dist/agents/plugins/claude/claude.models.d.ts.map +1 -1
- package/dist/agents/plugins/claude/claude.models.js +196 -10
- package/dist/agents/plugins/claude/claude.models.js.map +1 -1
- package/dist/agents/plugins/claude/claude.plugin.d.ts +1 -1
- package/dist/agents/plugins/claude/claude.plugin.d.ts.map +1 -1
- package/dist/agents/plugins/claude/claude.plugin.js +149 -47
- package/dist/agents/plugins/claude/claude.plugin.js.map +1 -1
- package/dist/agents/plugins/claude/claude.session.d.ts +17 -1
- package/dist/agents/plugins/claude/claude.session.d.ts.map +1 -1
- package/dist/agents/plugins/claude/claude.session.js +4 -0
- package/dist/agents/plugins/claude/claude.session.js.map +1 -1
- package/dist/agents/plugins/claude/plugin/statusline.bundle.mjs +729 -0
- package/dist/agents/plugins/claude/statusline-installer.d.ts +1 -1
- package/dist/agents/plugins/claude/statusline-installer.d.ts.map +1 -1
- package/dist/agents/plugins/claude/statusline-installer.js +41 -3
- package/dist/agents/plugins/claude/statusline-installer.js.map +1 -1
- package/dist/agents/plugins/codex/codex-models.d.ts.map +1 -1
- package/dist/agents/plugins/codex/codex-models.js +109 -8
- package/dist/agents/plugins/codex/codex-models.js.map +1 -1
- package/dist/agents/plugins/codex/codex.correlation.d.ts +39 -0
- package/dist/agents/plugins/codex/codex.correlation.d.ts.map +1 -0
- package/dist/agents/plugins/codex/codex.correlation.js +150 -0
- package/dist/agents/plugins/codex/codex.correlation.js.map +1 -0
- package/dist/agents/plugins/codex/codex.plugin.d.ts.map +1 -1
- package/dist/agents/plugins/codex/codex.plugin.js +8 -40
- package/dist/agents/plugins/codex/codex.plugin.js.map +1 -1
- package/dist/agents/plugins/kimi/kimi.env-model.d.ts +27 -0
- package/dist/agents/plugins/kimi/kimi.env-model.d.ts.map +1 -0
- package/dist/agents/plugins/kimi/kimi.env-model.js +52 -0
- package/dist/agents/plugins/kimi/kimi.env-model.js.map +1 -0
- package/dist/agents/plugins/kimi/kimi.session.d.ts +6 -0
- package/dist/agents/plugins/kimi/kimi.session.d.ts.map +1 -1
- package/dist/agents/plugins/kimi/kimi.session.js +24 -2
- package/dist/agents/plugins/kimi/kimi.session.js.map +1 -1
- package/dist/agents/plugins/opencode/opencode-dynamic-models.d.ts.map +1 -1
- package/dist/agents/plugins/opencode/opencode-dynamic-models.js +4 -5
- package/dist/agents/plugins/opencode/opencode-dynamic-models.js.map +1 -1
- package/dist/agents/plugins/pi/pi.models.d.ts.map +1 -1
- package/dist/agents/plugins/pi/pi.models.js +3 -3
- package/dist/agents/plugins/pi/pi.models.js.map +1 -1
- package/dist/bin/proxy-daemon.js +8 -1
- package/dist/bin/proxy-daemon.js.map +1 -1
- package/dist/cli/commands/analytics/cost/cost-enricher.d.ts +19 -2
- package/dist/cli/commands/analytics/cost/cost-enricher.d.ts.map +1 -1
- package/dist/cli/commands/analytics/cost/cost-enricher.js +171 -14
- package/dist/cli/commands/analytics/cost/cost-enricher.js.map +1 -1
- package/dist/cli/commands/analytics/cost/local-models.d.ts +15 -0
- package/dist/cli/commands/analytics/cost/local-models.d.ts.map +1 -0
- package/dist/cli/commands/analytics/cost/local-models.js +21 -0
- package/dist/cli/commands/analytics/cost/local-models.js.map +1 -0
- package/dist/cli/commands/analytics/cost/types.d.ts +60 -0
- package/dist/cli/commands/analytics/cost/types.d.ts.map +1 -1
- package/dist/cli/commands/analytics/cost/types.js.map +1 -1
- package/dist/cli/commands/analytics/cost/usage-readers.d.ts +25 -2
- package/dist/cli/commands/analytics/cost/usage-readers.d.ts.map +1 -1
- package/dist/cli/commands/analytics/cost/usage-readers.js +61 -3
- package/dist/cli/commands/analytics/cost/usage-readers.js.map +1 -1
- package/dist/cli/commands/analytics/formatter.d.ts +11 -0
- package/dist/cli/commands/analytics/formatter.d.ts.map +1 -1
- package/dist/cli/commands/analytics/formatter.js +28 -0
- package/dist/cli/commands/analytics/formatter.js.map +1 -1
- package/dist/cli/commands/analytics/index.d.ts.map +1 -1
- package/dist/cli/commands/analytics/index.js +70 -73
- package/dist/cli/commands/analytics/index.js.map +1 -1
- package/dist/cli/commands/analytics/otel-loader.d.ts.map +1 -1
- package/dist/cli/commands/analytics/otel-loader.js +60 -14
- package/dist/cli/commands/analytics/otel-loader.js.map +1 -1
- package/dist/cli/commands/analytics/otel-pricing.d.ts +38 -0
- package/dist/cli/commands/analytics/otel-pricing.d.ts.map +1 -0
- package/dist/cli/commands/analytics/otel-pricing.js +33 -0
- package/dist/cli/commands/analytics/otel-pricing.js.map +1 -0
- package/dist/cli/commands/analytics/report/client/app.js +279 -18
- package/dist/cli/commands/analytics/report/output-target.d.ts +22 -0
- package/dist/cli/commands/analytics/report/output-target.d.ts.map +1 -0
- package/dist/cli/commands/analytics/report/output-target.js +56 -0
- package/dist/cli/commands/analytics/report/output-target.js.map +1 -0
- package/dist/cli/commands/analytics/report/payload-builder.d.ts.map +1 -1
- package/dist/cli/commands/analytics/report/payload-builder.js +6 -0
- package/dist/cli/commands/analytics/report/payload-builder.js.map +1 -1
- package/dist/cli/commands/analytics/report/report-generator.d.ts +1 -1
- package/dist/cli/commands/analytics/report/report-generator.js +1 -1
- package/dist/cli/commands/analytics/report/session-report.d.ts +1 -3
- package/dist/cli/commands/analytics/report/session-report.d.ts.map +1 -1
- package/dist/cli/commands/analytics/report/session-report.js +1 -3
- package/dist/cli/commands/analytics/report/session-report.js.map +1 -1
- package/dist/cli/commands/analytics/report/template.html +6 -6
- package/dist/cli/commands/analytics/report/types.d.ts +17 -1
- package/dist/cli/commands/analytics/report/types.d.ts.map +1 -1
- package/dist/cli/commands/analytics/sources/sessions-source.d.ts.map +1 -1
- package/dist/cli/commands/analytics/sources/sessions-source.js +9 -11
- package/dist/cli/commands/analytics/sources/sessions-source.js.map +1 -1
- package/dist/cli/commands/analytics/sources/types.d.ts +0 -2
- package/dist/cli/commands/analytics/sources/types.d.ts.map +1 -1
- package/dist/cli/commands/analytics/types.d.ts +8 -8
- package/dist/cli/commands/analytics/types.d.ts.map +1 -1
- package/dist/cli/commands/assistants/constants.d.ts +4 -0
- package/dist/cli/commands/assistants/constants.d.ts.map +1 -1
- package/dist/cli/commands/assistants/constants.js +4 -0
- package/dist/cli/commands/assistants/constants.js.map +1 -1
- package/dist/cli/commands/assistants/setup/data.d.ts +1 -0
- package/dist/cli/commands/assistants/setup/data.d.ts.map +1 -1
- package/dist/cli/commands/assistants/setup/data.js +55 -10
- package/dist/cli/commands/assistants/setup/data.js.map +1 -1
- package/dist/cli/commands/assistants/setup/helpers.d.ts +1 -1
- package/dist/cli/commands/assistants/setup/helpers.d.ts.map +1 -1
- package/dist/cli/commands/assistants/setup/helpers.js +2 -5
- package/dist/cli/commands/assistants/setup/helpers.js.map +1 -1
- package/dist/cli/commands/assistants/setup/index.d.ts +12 -0
- package/dist/cli/commands/assistants/setup/index.d.ts.map +1 -1
- package/dist/cli/commands/assistants/setup/index.js +148 -20
- package/dist/cli/commands/assistants/setup/index.js.map +1 -1
- package/dist/cli/commands/models.d.ts.map +1 -1
- package/dist/cli/commands/models.js +16 -3
- package/dist/cli/commands/models.js.map +1 -1
- package/dist/cli/commands/profile/display.d.ts +5 -1
- package/dist/cli/commands/profile/display.d.ts.map +1 -1
- package/dist/cli/commands/profile/display.js +5 -1
- package/dist/cli/commands/profile/display.js.map +1 -1
- package/dist/cli/commands/profile/index.d.ts.map +1 -1
- package/dist/cli/commands/profile/index.js +7 -4
- package/dist/cli/commands/profile/index.js.map +1 -1
- package/dist/cli/commands/proxy/connect-orchestrator.d.ts.map +1 -1
- package/dist/cli/commands/proxy/connect-orchestrator.js +3 -4
- package/dist/cli/commands/proxy/connect-orchestrator.js.map +1 -1
- package/dist/cli/commands/proxy/connectors/desktop.d.ts +2 -3
- package/dist/cli/commands/proxy/connectors/desktop.d.ts.map +1 -1
- package/dist/cli/commands/proxy/connectors/desktop.js +9 -25
- package/dist/cli/commands/proxy/connectors/desktop.js.map +1 -1
- package/dist/cli/commands/proxy/connectors/model-name-resolver.d.ts +19 -0
- package/dist/cli/commands/proxy/connectors/model-name-resolver.d.ts.map +1 -0
- package/dist/cli/commands/proxy/connectors/model-name-resolver.js +126 -0
- package/dist/cli/commands/proxy/connectors/model-name-resolver.js.map +1 -0
- package/dist/cli/commands/proxy/connectors/tenant-catalog.d.ts +23 -0
- package/dist/cli/commands/proxy/connectors/tenant-catalog.d.ts.map +1 -0
- package/dist/cli/commands/proxy/connectors/tenant-catalog.js +136 -0
- package/dist/cli/commands/proxy/connectors/tenant-catalog.js.map +1 -0
- package/dist/cli/commands/proxy/connectors/vscode-claude-code.d.ts.map +1 -1
- package/dist/cli/commands/proxy/connectors/vscode-claude-code.js +49 -19
- package/dist/cli/commands/proxy/connectors/vscode-claude-code.js.map +1 -1
- package/dist/cli/commands/proxy/connectors/vscode-models.d.ts +21 -3
- package/dist/cli/commands/proxy/connectors/vscode-models.d.ts.map +1 -1
- package/dist/cli/commands/proxy/connectors/vscode-models.js +86 -28
- package/dist/cli/commands/proxy/connectors/vscode-models.js.map +1 -1
- package/dist/cli/commands/proxy/connectors/vscode.d.ts +3 -2
- package/dist/cli/commands/proxy/connectors/vscode.d.ts.map +1 -1
- package/dist/cli/commands/proxy/connectors/vscode.js +67 -39
- package/dist/cli/commands/proxy/connectors/vscode.js.map +1 -1
- package/dist/cli/commands/shared/headless.d.ts +69 -0
- package/dist/cli/commands/shared/headless.d.ts.map +1 -0
- package/dist/cli/commands/shared/headless.js +83 -0
- package/dist/cli/commands/shared/headless.js.map +1 -0
- package/dist/cli/commands/shared/helpers.d.ts +21 -0
- package/dist/cli/commands/shared/helpers.d.ts.map +1 -1
- package/dist/cli/commands/shared/helpers.js +73 -1
- package/dist/cli/commands/shared/helpers.js.map +1 -1
- package/dist/cli/commands/shared/identifier-resolution.d.ts +23 -0
- package/dist/cli/commands/shared/identifier-resolution.d.ts.map +1 -0
- package/dist/cli/commands/shared/identifier-resolution.js +55 -0
- package/dist/cli/commands/shared/identifier-resolution.js.map +1 -0
- package/dist/cli/commands/skills/setup/data.d.ts +3 -2
- package/dist/cli/commands/skills/setup/data.d.ts.map +1 -1
- package/dist/cli/commands/skills/setup/data.js +75 -13
- package/dist/cli/commands/skills/setup/data.js.map +1 -1
- package/dist/cli/commands/skills/setup/helpers.d.ts +1 -1
- package/dist/cli/commands/skills/setup/helpers.d.ts.map +1 -1
- package/dist/cli/commands/skills/setup/helpers.js +2 -5
- package/dist/cli/commands/skills/setup/helpers.js.map +1 -1
- package/dist/cli/commands/skills/setup/index.d.ts +17 -1
- package/dist/cli/commands/skills/setup/index.d.ts.map +1 -1
- package/dist/cli/commands/skills/setup/index.js +190 -19
- package/dist/cli/commands/skills/setup/index.js.map +1 -1
- package/dist/providers/core/codemie-auth-helpers.d.ts.map +1 -1
- package/dist/providers/core/codemie-auth-helpers.js +6 -1
- package/dist/providers/core/codemie-auth-helpers.js.map +1 -1
- package/dist/providers/core/default-agent-hooks.d.ts.map +1 -1
- package/dist/providers/core/default-agent-hooks.js +9 -0
- package/dist/providers/core/default-agent-hooks.js.map +1 -1
- package/dist/providers/plugins/bedrock/bedrock.template.d.ts.map +1 -1
- package/dist/providers/plugins/bedrock/bedrock.template.js +5 -31
- package/dist/providers/plugins/bedrock/bedrock.template.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/background-request-normalizer.plugin.d.ts +44 -0
- package/dist/providers/plugins/sso/proxy/plugins/background-request-normalizer.plugin.d.ts.map +1 -0
- package/dist/providers/plugins/sso/proxy/plugins/background-request-normalizer.plugin.js +106 -0
- package/dist/providers/plugins/sso/proxy/plugins/background-request-normalizer.plugin.js.map +1 -0
- package/dist/providers/plugins/sso/proxy/plugins/claude-model-resolver.d.ts +41 -0
- package/dist/providers/plugins/sso/proxy/plugins/claude-model-resolver.d.ts.map +1 -0
- package/dist/providers/plugins/sso/proxy/plugins/claude-model-resolver.js +115 -0
- package/dist/providers/plugins/sso/proxy/plugins/claude-model-resolver.js.map +1 -0
- package/dist/providers/plugins/sso/proxy/plugins/claude-request-normalizer.plugin.d.ts.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/claude-request-normalizer.plugin.js +101 -7
- package/dist/providers/plugins/sso/proxy/plugins/claude-request-normalizer.plugin.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/header-injection.plugin.d.ts +4 -0
- package/dist/providers/plugins/sso/proxy/plugins/header-injection.plugin.d.ts.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/header-injection.plugin.js +28 -3
- package/dist/providers/plugins/sso/proxy/plugins/header-injection.plugin.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/index.d.ts +3 -1
- package/dist/providers/plugins/sso/proxy/plugins/index.d.ts.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/index.js +5 -1
- package/dist/providers/plugins/sso/proxy/plugins/index.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/routing-header-injector.plugin.d.ts +67 -0
- package/dist/providers/plugins/sso/proxy/plugins/routing-header-injector.plugin.d.ts.map +1 -0
- package/dist/providers/plugins/sso/proxy/plugins/routing-header-injector.plugin.js +203 -0
- package/dist/providers/plugins/sso/proxy/plugins/routing-header-injector.plugin.js.map +1 -0
- package/dist/providers/plugins/sso/proxy/proxy-types.d.ts +5 -0
- package/dist/providers/plugins/sso/proxy/proxy-types.d.ts.map +1 -1
- package/dist/providers/plugins/sso/proxy/sso.proxy.d.ts.map +1 -1
- package/dist/providers/plugins/sso/proxy/sso.proxy.js +1 -0
- package/dist/providers/plugins/sso/proxy/sso.proxy.js.map +1 -1
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-aggregator.d.ts.map +1 -1
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-aggregator.js +11 -2
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-aggregator.js.map +1 -1
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-sync-processor.d.ts.map +1 -1
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-sync-processor.js +2 -1
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-sync-processor.js.map +1 -1
- package/dist/providers/plugins/sso/sso.http-client.d.ts +95 -0
- package/dist/providers/plugins/sso/sso.http-client.d.ts.map +1 -1
- package/dist/providers/plugins/sso/sso.http-client.js +79 -0
- package/dist/providers/plugins/sso/sso.http-client.js.map +1 -1
- package/dist/providers/plugins/sso/sso.models.d.ts +7 -0
- package/dist/providers/plugins/sso/sso.models.d.ts.map +1 -1
- package/dist/providers/plugins/sso/sso.models.js +22 -14
- package/dist/providers/plugins/sso/sso.models.js.map +1 -1
- package/dist/telemetry/clients/claude-desktop/claude-desktop.discovery.d.ts +1 -0
- package/dist/telemetry/clients/claude-desktop/claude-desktop.discovery.d.ts.map +1 -1
- package/dist/telemetry/clients/claude-desktop/claude-desktop.discovery.js +30 -6
- package/dist/telemetry/clients/claude-desktop/claude-desktop.discovery.js.map +1 -1
- package/dist/telemetry/clients/claude-desktop/claude-desktop.parser.d.ts.map +1 -1
- package/dist/telemetry/clients/claude-desktop/claude-desktop.parser.js +33 -3
- package/dist/telemetry/clients/claude-desktop/claude-desktop.parser.js.map +1 -1
- package/dist/telemetry/runtime/DesktopRepositoryResolver.d.ts +58 -0
- package/dist/telemetry/runtime/DesktopRepositoryResolver.d.ts.map +1 -0
- package/dist/telemetry/runtime/DesktopRepositoryResolver.js +370 -0
- package/dist/telemetry/runtime/DesktopRepositoryResolver.js.map +1 -0
- package/dist/telemetry/runtime/DesktopTelemetryRuntime.d.ts +1 -0
- package/dist/telemetry/runtime/DesktopTelemetryRuntime.d.ts.map +1 -1
- package/dist/telemetry/runtime/DesktopTelemetryRuntime.js +89 -6
- package/dist/telemetry/runtime/DesktopTelemetryRuntime.js.map +1 -1
- package/dist/telemetry/runtime/types.d.ts +2 -0
- package/dist/telemetry/runtime/types.d.ts.map +1 -1
- package/dist/utils/auth.d.ts +13 -2
- package/dist/utils/auth.d.ts.map +1 -1
- package/dist/utils/auth.js +7 -3
- package/dist/utils/auth.js.map +1 -1
- package/dist/utils/bedrock-pricing.mjs +111 -0
- package/dist/utils/cli-updater.d.ts.map +1 -1
- package/dist/utils/cli-updater.js +32 -7
- package/dist/utils/cli-updater.js.map +1 -1
- package/dist/utils/config.d.ts +21 -0
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +69 -7
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/credential-crypto.d.ts +51 -0
- package/dist/utils/credential-crypto.d.ts.map +1 -0
- package/dist/utils/credential-crypto.js +96 -0
- package/dist/utils/credential-crypto.js.map +1 -0
- package/dist/utils/errors.d.ts +14 -0
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +25 -0
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/model-normalizer.d.ts +6 -0
- package/dist/utils/model-normalizer.d.ts.map +1 -1
- package/dist/utils/model-normalizer.js +37 -19
- package/dist/utils/model-normalizer.js.map +1 -1
- package/dist/utils/paths.d.ts +2 -2
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +11 -9
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/price-resolution.d.ts +42 -0
- package/dist/utils/price-resolution.d.ts.map +1 -0
- package/dist/utils/price-resolution.js +112 -0
- package/dist/utils/price-resolution.js.map +1 -0
- package/dist/utils/pricing.d.ts +65 -6
- package/dist/utils/pricing.d.ts.map +1 -1
- package/dist/utils/pricing.js +91 -117
- package/dist/utils/pricing.js.map +1 -1
- package/dist/utils/pricing.json +201 -20
- package/dist/utils/processes.d.ts +12 -0
- package/dist/utils/processes.d.ts.map +1 -1
- package/dist/utils/processes.js +15 -0
- package/dist/utils/processes.js.map +1 -1
- package/dist/utils/routing-headers.mjs +104 -0
- package/dist/utils/security.d.ts +0 -32
- package/dist/utils/security.d.ts.map +1 -1
- package/dist/utils/security.js +20 -102
- package/dist/utils/security.js.map +1 -1
- package/package.json +5 -2
- package/scripts/bundle-statusline.mjs +37 -0
- package/scripts/copy-plugins.js +19 -2
- package/src/utils/tips.json +9 -9
- package/dist/agents/plugins/claude/plugin/__tests__/statusline.test.ts +0 -323
- package/dist/agents/plugins/claude/plugin/statusline.mjs +0 -282
- package/dist/cli/commands/analytics/exporter.d.ts +0 -20
- package/dist/cli/commands/analytics/exporter.d.ts.map +0 -1
- package/dist/cli/commands/analytics/exporter.js +0 -91
- package/dist/cli/commands/analytics/exporter.js.map +0 -1
package/dist/utils/pricing.js
CHANGED
|
@@ -8,142 +8,116 @@
|
|
|
8
8
|
import { readFileSync } from 'node:fs';
|
|
9
9
|
import { join } from 'node:path';
|
|
10
10
|
import { getDirname } from './paths.js';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { applyBedrockRegionalPremium } from './bedrock-pricing.mjs';
|
|
12
|
+
import { ConfigurationError } from './errors.js';
|
|
13
|
+
import { priceTableKey, resolvePriceKey } from './price-resolution.js';
|
|
14
|
+
export { canonicalizeModelId } from './price-resolution.js';
|
|
15
|
+
/**
|
|
16
|
+
* CodeMie-specific ids the vendored table will never carry. Merged over the vendored rows
|
|
17
|
+
* in {@link table}, so re-copying `pricing.json` from agentlytics does not silently drop them.
|
|
18
|
+
*
|
|
19
|
+
* `claude-smart-router` is a Switchyard routing alias, not a generation model. The alias bills
|
|
20
|
+
* only the Haiku classifier hop that picks a target; the generation itself is billed against the
|
|
21
|
+
* model the router dispatched to, which arrives in the response body's own `model` field and is
|
|
22
|
+
* priced from its own row. Haiku rates therefore price what this id actually costs — without a
|
|
23
|
+
* row at all, `lookupPrice` returns null and the turn drops out of every cost total.
|
|
24
|
+
*/
|
|
25
|
+
const CODEMIE_PRICES = {
|
|
26
|
+
'claude-smart-router': { input: 1, output: 5, cacheRead: 0.1, cacheWrite: 1.25, cacheWrite1h: 2 },
|
|
27
|
+
};
|
|
13
28
|
const HERE = getDirname(import.meta.url);
|
|
14
29
|
let TABLE = null;
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return TABLE;
|
|
30
|
+
function toModelPrice(p) {
|
|
31
|
+
return {
|
|
32
|
+
input: p.input ?? 0,
|
|
33
|
+
output: p.output ?? 0,
|
|
34
|
+
cacheRead: p.cacheRead ?? 0,
|
|
35
|
+
cacheCreation: p.cacheWrite ?? 0,
|
|
36
|
+
cacheWrite1h: p.cacheWrite1h,
|
|
37
|
+
bedrockRegionalMultiplier: p.bedrockRegionalMultiplier,
|
|
38
|
+
estimated: p.estimated,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function pricesEqual(a, b) {
|
|
42
|
+
return (a.input === b.input
|
|
43
|
+
&& a.output === b.output
|
|
44
|
+
&& a.cacheRead === b.cacheRead
|
|
45
|
+
&& a.cacheCreation === b.cacheCreation
|
|
46
|
+
&& a.cacheWrite1h === b.cacheWrite1h
|
|
47
|
+
&& a.bedrockRegionalMultiplier === b.bedrockRegionalMultiplier
|
|
48
|
+
&& a.estimated === b.estimated);
|
|
35
49
|
}
|
|
36
50
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* `
|
|
40
|
-
*
|
|
51
|
+
* Builds the rate card from a bag of raw rows (a parsed `pricing.json`, an injected fixture for
|
|
52
|
+
* tests, or any merge of the two): every key is lowercased and dots are turned to dashes, so
|
|
53
|
+
* `GLM-4.7` and `glm-4-7` land on the same table entry. When two distinct raw keys normalize to
|
|
54
|
+
* the same table key, they must carry identical prices — that is the only way the pricing data
|
|
55
|
+
* itself can declare two spellings of the same model (e.g. `gemini-3.7-flash` / `gemini-3-7-flash`)
|
|
56
|
+
* — otherwise the table is ambiguous and this throws rather than silently picking one.
|
|
41
57
|
*/
|
|
42
|
-
function
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if (
|
|
46
|
-
|
|
58
|
+
export function buildPriceTable(rows) {
|
|
59
|
+
const built = {};
|
|
60
|
+
for (const [rawKey, raw] of Object.entries(rows)) {
|
|
61
|
+
if (rawKey.startsWith('_')) {
|
|
62
|
+
continue; // skip _meta and similar
|
|
47
63
|
}
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
if (
|
|
52
|
-
|
|
64
|
+
const key = priceTableKey(rawKey);
|
|
65
|
+
const price = toModelPrice(raw);
|
|
66
|
+
const existing = built[key];
|
|
67
|
+
if (existing && !pricesEqual(existing, price)) {
|
|
68
|
+
throw new ConfigurationError(`[pricing] "${rawKey}" normalizes to key "${key}", which already holds a different price`);
|
|
53
69
|
}
|
|
54
|
-
|
|
70
|
+
built[key] = price;
|
|
55
71
|
}
|
|
72
|
+
return built;
|
|
56
73
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
* Parse the version segments trailing a tier prefix into a numeric tuple for comparison, e.g.
|
|
61
|
-
* `claude-sonnet-4-8` under tier `claude-sonnet` -> `[4, 8]`. Returns null for keys that don't
|
|
62
|
-
* fit the plain `<tier>(-<digits>)*` shape — non-numeric segments (`-latest`) or a long numeric
|
|
63
|
-
* segment (a pinned date snapshot like `-20250514`, 8 digits) — since those aren't meaningful
|
|
64
|
-
* "is this newer" signals and would otherwise outrank a real version bump by raw magnitude.
|
|
65
|
-
*/
|
|
66
|
-
function tierVersionTuple(key, tier) {
|
|
67
|
-
const rest = key.slice(tier.length);
|
|
68
|
-
if (!rest) {
|
|
69
|
-
return [0];
|
|
70
|
-
}
|
|
71
|
-
const segments = rest.split('-').filter(Boolean);
|
|
72
|
-
const nums = [];
|
|
73
|
-
for (const segment of segments) {
|
|
74
|
-
if (!/^\d+$/.test(segment) || segment.length >= 8) {
|
|
75
|
-
return null;
|
|
76
|
-
}
|
|
77
|
-
nums.push(Number(segment));
|
|
74
|
+
function table() {
|
|
75
|
+
if (TABLE) {
|
|
76
|
+
return TABLE;
|
|
78
77
|
}
|
|
79
|
-
|
|
78
|
+
const raw = JSON.parse(readFileSync(join(HERE, 'pricing.json'), 'utf-8'));
|
|
79
|
+
TABLE = buildPriceTable({ ...raw, ...CODEMIE_PRICES });
|
|
80
|
+
return TABLE;
|
|
80
81
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
return
|
|
82
|
+
/**
|
|
83
|
+
* The fully built rate card: the vendored table with {@link CODEMIE_PRICES} merged over it and every
|
|
84
|
+
* key lowercased. Exported so consumers that cannot import this module — the standalone Claude
|
|
85
|
+
* statusline, which runs as a detached `node <path>` process — can be handed the same rates rather
|
|
86
|
+
* than a copy of the raw `pricing.json`, which carries none of the CodeMie-only rows.
|
|
87
|
+
*/
|
|
88
|
+
export function priceTable() {
|
|
89
|
+
return table();
|
|
89
90
|
}
|
|
90
91
|
/**
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
92
|
+
* Resolves pricing for a model, reporting how it was matched. Returns null when no entry
|
|
93
|
+
* matches (the caller marks the model `unpriced` — never a silent $0, and never a guessed
|
|
94
|
+
* family/tier price). The lookup order (exact, then one snapshot suffix stripped, then a
|
|
95
|
+
* version-first Claude id reordered to family-first) lives in {@link resolvePriceKey}, shared
|
|
96
|
+
* with the Claude statusline so the two can never price the same id differently.
|
|
97
|
+
*
|
|
98
|
+
* `model` is also checked, in its original unnormalized form, for a Bedrock region qualifier
|
|
99
|
+
* (see {@link applyBedrockRegionalPremium}) — pass the raw backend id straight through rather
|
|
100
|
+
* than pre-normalizing it, or the premium this exists to detect is invisible by the time it gets
|
|
101
|
+
* here.
|
|
96
102
|
*/
|
|
97
|
-
function
|
|
98
|
-
const
|
|
99
|
-
|
|
103
|
+
export function resolvePrice(model) {
|
|
104
|
+
const prices = table();
|
|
105
|
+
const hit = resolvePriceKey(model, (key) => (Object.hasOwn(prices, key) ? prices[key] : undefined));
|
|
106
|
+
if (!hit) {
|
|
100
107
|
return null;
|
|
101
108
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
if (version === null) {
|
|
109
|
-
continue;
|
|
110
|
-
}
|
|
111
|
-
if (!best || compareVersionTuples(version, best.version) > 0) {
|
|
112
|
-
best = { key, version, price };
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
return best ? { key: best.key, price: best.price } : null;
|
|
109
|
+
return {
|
|
110
|
+
price: applyBedrockRegionalPremium(hit.value, model),
|
|
111
|
+
key: hit.key,
|
|
112
|
+
match: hit.match,
|
|
113
|
+
estimated: hit.value.estimated ?? false,
|
|
114
|
+
};
|
|
116
115
|
}
|
|
117
116
|
/**
|
|
118
|
-
* Look up pricing for a model. Returns null when no entry matches
|
|
119
|
-
*
|
|
120
|
-
* 1. Exact (normalized) match — authoritative.
|
|
121
|
-
* 2. Longest key aligned to a segment boundary — a deliberate family fallback, logged as inexact.
|
|
122
|
-
* 3. Latest same-tier Claude price — for a model newer than every table entry, logged as inexact.
|
|
123
|
-
* Dots are folded to dashes first because the table keys use dashes (e.g. `gpt-4-1`, not `gpt-4.1`).
|
|
117
|
+
* Look up pricing for a model. Returns null when no entry matches. Thin wrapper over
|
|
118
|
+
* {@link resolvePrice} for callers that only need the price, not its provenance.
|
|
124
119
|
*/
|
|
125
120
|
export function lookupPrice(model) {
|
|
126
|
-
|
|
127
|
-
const prices = table();
|
|
128
|
-
const exact = prices[normalized];
|
|
129
|
-
if (exact) {
|
|
130
|
-
return exact;
|
|
131
|
-
}
|
|
132
|
-
let best = null;
|
|
133
|
-
for (const [key, price] of Object.entries(prices)) {
|
|
134
|
-
if (isSegmentMatch(normalized, key) && (!best || key.length > best.key.length)) {
|
|
135
|
-
best = { key, price };
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
if (best) {
|
|
139
|
-
logger.debug(`[pricing] no exact entry for "${normalized}"; using family price "${best.key}"`);
|
|
140
|
-
return best.price;
|
|
141
|
-
}
|
|
142
|
-
const tierFallback = claudeTierFallback(normalized, prices);
|
|
143
|
-
if (tierFallback) {
|
|
144
|
-
logger.debug(`[pricing] no entry for "${normalized}"; using latest same-tier price "${tierFallback.key}"`);
|
|
145
|
-
return tierFallback.price;
|
|
146
|
-
}
|
|
147
|
-
return null;
|
|
121
|
+
return resolvePrice(model)?.price ?? null;
|
|
148
122
|
}
|
|
149
123
|
//# sourceMappingURL=pricing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricing.js","sourceRoot":"","sources":["../../src/utils/pricing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"pricing.js","sourceRoot":"","sources":["../../src/utils/pricing.ts"],"names":[],"mappings":"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"}
|
package/dist/utils/pricing.json
CHANGED
|
@@ -16,58 +16,106 @@
|
|
|
16
16
|
"keys": "All keys use dashes instead of dots (e.g. gpt-5-4 not gpt-5.4) so normalizeModelName dots→dashes works",
|
|
17
17
|
"cacheRead": "cache hit price (Anthropic: 0.1x input, OpenAI: varies, Google: ~0.1x input)",
|
|
18
18
|
"cacheWrite": "cache write price (Anthropic: 1.25x input, OpenAI: ~same as input)",
|
|
19
|
-
"claude5": "Sonnet 5 and Opus 5 standard API-equivalent token rates verified 2026-09-15 at https://platform.claude.com/docs/en/about-claude/pricing; excludes additional tool charges. Sonnet 5's planned September 1 price increase was cancelled."
|
|
19
|
+
"claude5": "Sonnet 5 and Opus 5 standard API-equivalent token rates verified 2026-09-15; Fable 5/5.1, Mythos 5/5.1 and Opus 4.7/4.8 verified 2026-09-27 at https://platform.claude.com/docs/en/about-claude/pricing; excludes additional tool charges. Sonnet 5's planned September 1 price increase was cancelled.",
|
|
20
|
+
"t10CatalogReconciliation": "Rows added 2026-09-26 to price catalog ids that resolvePrice() found unpriced (unify-analytics-cost-command T10), each verified against one official vendor page/API on that date. claude-opus-5-5: $4/$20 base, $5/$8 5m/1h cache write, $0.20 cache read (0.05x multiplier), bedrockRegionalMultiplier 1.1 (Opus 4.5+ scope) — https://platform.claude.com/docs/en/about-claude/pricing (Model pricing table row 'Claude Opus 5.5'). gpt-5-5: short-context Standard row '$5.00 | $0.50 | - | $30.00' — https://developers.openai.com/api/docs/pricing ('Standard Pricing Tables', row 'gpt-5.5 (<272K context length)'); cache-write column is '-' (not stated) so cacheWrite mirrors input, matching this table's existing gpt-5-4 handling. gpt-5-6-luna/-sol/-terra and gpt-6-luna/-sol: short-context Standard rows from the same OpenAI page/table, e.g. 'gpt-6-sol | $2.00 | $0.20 | $2.50 | $10.00'; these rows do state a real cache-write price (~1.25x input) so it is recorded as-is rather than mirrored. deepseek-v4-pro: peak (weekday 01:00-04:00/06:00-10:00 UTC) cache-miss input $1.32, cache-hit input $0.044, output $3.96 — https://api-docs.deepseek.com/quick_start/pricing/; off-peak (all other hours, including weekends) is exactly half: $0.66/$0.022/$1.98; peak chosen as the flat row like every other entry in this table, no time-of-day tiering supported by the schema; cacheWrite mirrors input per this table's deepseek-chat/deepseek-reasoner precedent. gemini-3-6-flash/gemini-3-8-flash: paid-tier Standard pricing 'through Dec 31, 2026' — $0.75 input/$3.75 output/$0.075 context-caching — https://ai.google.dev/gemini-api/docs/pricing; scheduled to double to $1.50/$7.50/$0.15 on 2027-01-01, not yet in effect as of verification; cacheWrite mirrors input per this table's gemini-3-5-flash/gemini-3-7-flash precedent. gemini-3-1-flash-image: Standard pricing 'Input: $0.50 (text/image); Output: $3 (text/thinking), $60.00 (images)' — https://ai.google.dev/gemini-api/docs/pricing; output field records the $60 image-generation rate (not the $3 text/thinking rate), matching this table's existing gemini-3-1-flash-image-preview/gemini-2-5-flash-image rows, which use the same convention (schema has no separate image-output field); cacheRead/cacheWrite 0 (no cache pricing published for this model). grok-4-6: base tier (<200k prompt tokens) row 'grok-4.6 (< 200k prompt tokens) | 500k | $2.00 | $0.50 | $6.00' — https://docs.x.ai/developers/models; xAI doubles every rate for prompts >=200k tokens, not represented here (schema is flat), so this is the base/short-context tier, consistent with this table's other short-context-only entries; cacheWrite mirrors input per this table's grok-4/grok-4-1-fast precedent. qwen3-coder-30b-a3b-v1 and qwen3-coder-480b-a35b-v1: AWS Bedrock on-demand Standard tier, US East (N. Virginia) — official AWS Price List API https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonBedrock/20260926004940/us-east-1/index.json (also rendered at https://aws.amazon.com/bedrock/pricing/), SKU usagetype 'qwen.qwen3-coder-30b-a3b-instruct-mantle-{input,output}-tokens-standard' = $0.00015/$0.0006 per 1K tokens ($0.15/$0.60 per 1M) and 'qwen.qwen3-coder-480b-a35b-instruct-mantle-{input,output}-tokens-standard' = $0.00045/$0.0018 per 1K tokens ($0.45/$1.80 per 1M); no cache pricing published for either. Checked but NOT added (no official page states a price for the exact catalog id): claude-4-5-sonnet / claude-4-5-sonnet-vertex now resolve via the T1 reorder fallback onto the existing claude-sonnet-4-5 row, so no new row was needed."
|
|
20
21
|
},
|
|
21
|
-
"note": "codemie: added claude 4-7/4-8 tier estimates 2026-06-08; added kimi-for-coding alias and normalized kimi-k2-5 key 2026-06-15; added claude-sonnet-5 pinned entry 2026-07-01 (
|
|
22
|
+
"note": "codemie: added claude 4-7/4-8 tier estimates 2026-06-08; added kimi-for-coding alias and normalized kimi-k2-5 key 2026-06-15; added claude-sonnet-5 pinned entry 2026-07-01 (current resolution order: exact match, then one trailing snapshot suffix stripped, then a version-first Claude id reordered to its family-first table key, else unpriced — no family/tier fallback; see resolvePrice() in pricing.ts); corrected claude-sonnet-5 to its real $2/$10 rate 2026-09-15 (was pinned at the old Sonnet 4.x $3/$15 rate — Anthropic's introductory $2/$10 pricing for Sonnet 5 became standard instead of increasing to $3/$15 as originally scheduled); added per-row bedrockRegionalMultiplier 2026-09-15 to every Sonnet 4.5+/Haiku 4.5+/Opus 4.5+ row (including their dated snapshots) — Amazon Bedrock bills a regional/multi-region endpoint (a US/EU/JP/AU cross-region inference profile, or a single named AWS region) at this multiplier over its global endpoint, for exactly these generations and later; see https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock#regions. Applied by lookupPrice() (pricing.ts) and lookupRate() (statusline.mjs) when isBedrockRegionalPremium() (bedrock-pricing.mjs) detects a non-global Bedrock region qualifier on the raw model id — never a flat account-wide discount, and never on a pre-4.5 row that has no such field. Added 14 catalog-pricing-reconciliation rows 2026-09-26 (unify-analytics-cost-command T10): claude-opus-5-5, gpt-5-5, gpt-5-6-luna, gpt-5-6-sol, gpt-5-6-terra, gpt-6-luna, gpt-6-sol, deepseek-v4-pro, gemini-3-6-flash, gemini-3-8-flash, gemini-3-1-flash-image, grok-4-6, qwen3-coder-30b-a3b-v1, qwen3-coder-480b-a35b-v1 — each sourced from one official vendor pricing page/API, see notes.t10CatalogReconciliation for exact quotes and URLs. deepseek-v4-pro and qwen3-coder-30b-a3b-v1 (Bedrock) remain named 'unresolved' in the T3 report's prior draft; the AWS official Price List API resolved the qwen rows where the rendered pricing page alone was ambiguous. 2026-09-27: added claude-fable-5-1 / claude-mythos-5-1 ($10/$50, cache read $0.25 = 0.025x input) and claude-fable-5 / claude-mythos-5 ($10/$50, cache read $1), and removed the estimated flag from claude-opus-4-7 / claude-opus-4-8 (published at $5/$25, cache read $0.50) — all verified at https://platform.claude.com/docs/en/about-claude/pricing. claude-sonnet-4-7, claude-sonnet-4-8 and claude-haiku-4-6 are not on that page and stay estimated. 2026-09-27: added gpt-6-astra ($10/$1/$50 short-context tier; long tier $20/$2/$75), gpt-5-5-pro ($30/$180, no cached-input discount), gpt-5-4-mini ($0.75/$0.075/$4.50) and gpt-5-4-nano ($0.20/$0.02/$1.25), and corrected rounded cacheRead on gpt-5-1 (0.125), o4-mini (0.275) and gpt-4o-mini (0.075) — standard tier at https://developers.openai.com/api/docs/pricing. 2026-09-27: added kimi-k3 ($3/$15, cache read $0.30, cache write $3, 1h cache write $6) with an identical bare `k3` alias row (kimi-code logs the bare id `k3`, and resolvePrice() does not strip a provider-less prefix), and kimi-k2-6 ($0.95/$4, cache read $0.16, cache write $0.95) — https://platform.kimi.ai/docs/pricing/chat. k3 used through api.kimi.com/coding is billed as a flat Kimi Code subscription, so its report cost is an API-equivalent estimate, not an invoice. kimi-k2.5 is no longer listed on that page; its existing row is kept as last published."
|
|
22
23
|
},
|
|
23
24
|
"claude-sonnet-5": {
|
|
24
25
|
"input": 2,
|
|
25
26
|
"output": 10,
|
|
26
27
|
"cacheRead": 0.2,
|
|
27
28
|
"cacheWrite": 2.5,
|
|
28
|
-
"cacheWrite1h": 4.0
|
|
29
|
+
"cacheWrite1h": 4.0,
|
|
30
|
+
"bedrockRegionalMultiplier": 1.1
|
|
31
|
+
},
|
|
32
|
+
"claude-fable-5-1": {
|
|
33
|
+
"input": 10,
|
|
34
|
+
"output": 50,
|
|
35
|
+
"cacheRead": 0.25,
|
|
36
|
+
"cacheWrite": 12.5,
|
|
37
|
+
"cacheWrite1h": 20,
|
|
38
|
+
"bedrockRegionalMultiplier": 1.1
|
|
39
|
+
},
|
|
40
|
+
"claude-mythos-5-1": {
|
|
41
|
+
"input": 10,
|
|
42
|
+
"output": 50,
|
|
43
|
+
"cacheRead": 0.25,
|
|
44
|
+
"cacheWrite": 12.5,
|
|
45
|
+
"cacheWrite1h": 20,
|
|
46
|
+
"bedrockRegionalMultiplier": 1.1
|
|
47
|
+
},
|
|
48
|
+
"claude-fable-5": {
|
|
49
|
+
"input": 10,
|
|
50
|
+
"output": 50,
|
|
51
|
+
"cacheRead": 1,
|
|
52
|
+
"cacheWrite": 12.5,
|
|
53
|
+
"cacheWrite1h": 20,
|
|
54
|
+
"bedrockRegionalMultiplier": 1.1
|
|
55
|
+
},
|
|
56
|
+
"claude-mythos-5": {
|
|
57
|
+
"input": 10,
|
|
58
|
+
"output": 50,
|
|
59
|
+
"cacheRead": 1,
|
|
60
|
+
"cacheWrite": 12.5,
|
|
61
|
+
"cacheWrite1h": 20,
|
|
62
|
+
"bedrockRegionalMultiplier": 1.1
|
|
63
|
+
},
|
|
64
|
+
"claude-opus-5-5": {
|
|
65
|
+
"input": 4,
|
|
66
|
+
"output": 20,
|
|
67
|
+
"cacheRead": 0.2,
|
|
68
|
+
"cacheWrite": 5,
|
|
69
|
+
"cacheWrite1h": 8,
|
|
70
|
+
"bedrockRegionalMultiplier": 1.1
|
|
29
71
|
},
|
|
30
72
|
"claude-opus-5": {
|
|
31
73
|
"input": 5,
|
|
32
74
|
"output": 25,
|
|
33
75
|
"cacheRead": 0.5,
|
|
34
76
|
"cacheWrite": 6.25,
|
|
35
|
-
"cacheWrite1h": 10.0
|
|
77
|
+
"cacheWrite1h": 10.0,
|
|
78
|
+
"bedrockRegionalMultiplier": 1.1
|
|
36
79
|
},
|
|
37
80
|
"claude-opus-4-6": {
|
|
38
81
|
"input": 5,
|
|
39
82
|
"output": 25,
|
|
40
83
|
"cacheRead": 0.5,
|
|
41
84
|
"cacheWrite": 6.25,
|
|
42
|
-
"cacheWrite1h": 10.0
|
|
85
|
+
"cacheWrite1h": 10.0,
|
|
86
|
+
"bedrockRegionalMultiplier": 1.1
|
|
43
87
|
},
|
|
44
88
|
"claude-sonnet-4-6": {
|
|
45
89
|
"input": 3,
|
|
46
90
|
"output": 15,
|
|
47
91
|
"cacheRead": 0.3,
|
|
48
92
|
"cacheWrite": 3.75,
|
|
49
|
-
"cacheWrite1h": 6.0
|
|
93
|
+
"cacheWrite1h": 6.0,
|
|
94
|
+
"bedrockRegionalMultiplier": 1.1
|
|
50
95
|
},
|
|
51
96
|
"claude-opus-4-5": {
|
|
52
97
|
"input": 5,
|
|
53
98
|
"output": 25,
|
|
54
99
|
"cacheRead": 0.5,
|
|
55
100
|
"cacheWrite": 6.25,
|
|
56
|
-
"cacheWrite1h": 10.0
|
|
101
|
+
"cacheWrite1h": 10.0,
|
|
102
|
+
"bedrockRegionalMultiplier": 1.1
|
|
57
103
|
},
|
|
58
104
|
"claude-sonnet-4-5": {
|
|
59
105
|
"input": 3,
|
|
60
106
|
"output": 15,
|
|
61
107
|
"cacheRead": 0.3,
|
|
62
108
|
"cacheWrite": 3.75,
|
|
63
|
-
"cacheWrite1h": 6.0
|
|
109
|
+
"cacheWrite1h": 6.0,
|
|
110
|
+
"bedrockRegionalMultiplier": 1.1
|
|
64
111
|
},
|
|
65
112
|
"claude-haiku-4-5": {
|
|
66
113
|
"input": 1,
|
|
67
114
|
"output": 5,
|
|
68
115
|
"cacheRead": 0.1,
|
|
69
116
|
"cacheWrite": 1.25,
|
|
70
|
-
"cacheWrite1h": 2.0
|
|
117
|
+
"cacheWrite1h": 2.0,
|
|
118
|
+
"bedrockRegionalMultiplier": 1.1
|
|
71
119
|
},
|
|
72
120
|
"claude-opus-4-1": {
|
|
73
121
|
"input": 15,
|
|
@@ -151,6 +199,66 @@
|
|
|
151
199
|
"cacheRead": 30,
|
|
152
200
|
"cacheWrite": 30
|
|
153
201
|
},
|
|
202
|
+
"gpt-5-5": {
|
|
203
|
+
"input": 5,
|
|
204
|
+
"output": 30,
|
|
205
|
+
"cacheRead": 0.5,
|
|
206
|
+
"cacheWrite": 5
|
|
207
|
+
},
|
|
208
|
+
"gpt-5-6-luna": {
|
|
209
|
+
"input": 0.2,
|
|
210
|
+
"output": 1.2,
|
|
211
|
+
"cacheRead": 0.02,
|
|
212
|
+
"cacheWrite": 0.25
|
|
213
|
+
},
|
|
214
|
+
"gpt-5-6-sol": {
|
|
215
|
+
"input": 4,
|
|
216
|
+
"output": 20,
|
|
217
|
+
"cacheRead": 0.4,
|
|
218
|
+
"cacheWrite": 5
|
|
219
|
+
},
|
|
220
|
+
"gpt-5-6-terra": {
|
|
221
|
+
"input": 2,
|
|
222
|
+
"output": 12,
|
|
223
|
+
"cacheRead": 0.2,
|
|
224
|
+
"cacheWrite": 2.5
|
|
225
|
+
},
|
|
226
|
+
"gpt-6-luna": {
|
|
227
|
+
"input": 0.1,
|
|
228
|
+
"output": 0.5,
|
|
229
|
+
"cacheRead": 0.01,
|
|
230
|
+
"cacheWrite": 0.125
|
|
231
|
+
},
|
|
232
|
+
"gpt-6-astra": {
|
|
233
|
+
"input": 10,
|
|
234
|
+
"output": 50,
|
|
235
|
+
"cacheRead": 1,
|
|
236
|
+
"cacheWrite": 10
|
|
237
|
+
},
|
|
238
|
+
"gpt-5-5-pro": {
|
|
239
|
+
"input": 30,
|
|
240
|
+
"output": 180,
|
|
241
|
+
"cacheRead": 30,
|
|
242
|
+
"cacheWrite": 30
|
|
243
|
+
},
|
|
244
|
+
"gpt-5-4-mini": {
|
|
245
|
+
"input": 0.75,
|
|
246
|
+
"output": 4.5,
|
|
247
|
+
"cacheRead": 0.075,
|
|
248
|
+
"cacheWrite": 0.75
|
|
249
|
+
},
|
|
250
|
+
"gpt-5-4-nano": {
|
|
251
|
+
"input": 0.2,
|
|
252
|
+
"output": 1.25,
|
|
253
|
+
"cacheRead": 0.02,
|
|
254
|
+
"cacheWrite": 0.2
|
|
255
|
+
},
|
|
256
|
+
"gpt-6-sol": {
|
|
257
|
+
"input": 2,
|
|
258
|
+
"output": 10,
|
|
259
|
+
"cacheRead": 0.2,
|
|
260
|
+
"cacheWrite": 2.5
|
|
261
|
+
},
|
|
154
262
|
"gpt-5-2": {
|
|
155
263
|
"input": 1.75,
|
|
156
264
|
"output": 14,
|
|
@@ -166,7 +274,7 @@
|
|
|
166
274
|
"gpt-5-1": {
|
|
167
275
|
"input": 1.25,
|
|
168
276
|
"output": 10,
|
|
169
|
-
"cacheRead": 0.
|
|
277
|
+
"cacheRead": 0.125,
|
|
170
278
|
"cacheWrite": 1.25
|
|
171
279
|
},
|
|
172
280
|
"gpt-5": {
|
|
@@ -256,7 +364,7 @@
|
|
|
256
364
|
"gpt-4o-mini": {
|
|
257
365
|
"input": 0.15,
|
|
258
366
|
"output": 0.6,
|
|
259
|
-
"cacheRead": 0.
|
|
367
|
+
"cacheRead": 0.075,
|
|
260
368
|
"cacheWrite": 0.15
|
|
261
369
|
},
|
|
262
370
|
"gpt-4-turbo": {
|
|
@@ -316,7 +424,7 @@
|
|
|
316
424
|
"o4-mini": {
|
|
317
425
|
"input": 1.1,
|
|
318
426
|
"output": 4.4,
|
|
319
|
-
"cacheRead": 0.
|
|
427
|
+
"cacheRead": 0.275,
|
|
320
428
|
"cacheWrite": 1.1
|
|
321
429
|
},
|
|
322
430
|
"gemini-3-1-pro": {
|
|
@@ -367,6 +475,18 @@
|
|
|
367
475
|
"cacheRead": 0.025,
|
|
368
476
|
"cacheWrite": 0.25
|
|
369
477
|
},
|
|
478
|
+
"gemini-3-6-flash": {
|
|
479
|
+
"input": 0.75,
|
|
480
|
+
"output": 3.75,
|
|
481
|
+
"cacheRead": 0.075,
|
|
482
|
+
"cacheWrite": 0.75
|
|
483
|
+
},
|
|
484
|
+
"gemini-3-8-flash": {
|
|
485
|
+
"input": 0.75,
|
|
486
|
+
"output": 3.75,
|
|
487
|
+
"cacheRead": 0.075,
|
|
488
|
+
"cacheWrite": 0.75
|
|
489
|
+
},
|
|
370
490
|
"gemini-2-5-pro": {
|
|
371
491
|
"input": 1.25,
|
|
372
492
|
"output": 10,
|
|
@@ -421,6 +541,12 @@
|
|
|
421
541
|
"cacheRead": 0.05,
|
|
422
542
|
"cacheWrite": 0.2
|
|
423
543
|
},
|
|
544
|
+
"grok-4-6": {
|
|
545
|
+
"input": 2,
|
|
546
|
+
"output": 6,
|
|
547
|
+
"cacheRead": 0.5,
|
|
548
|
+
"cacheWrite": 2
|
|
549
|
+
},
|
|
424
550
|
"grok-4-fast": {
|
|
425
551
|
"input": 0.2,
|
|
426
552
|
"output": 0.5,
|
|
@@ -457,12 +583,19 @@
|
|
|
457
583
|
"cacheRead": 0.028,
|
|
458
584
|
"cacheWrite": 0.28
|
|
459
585
|
},
|
|
586
|
+
"deepseek-v4-pro": {
|
|
587
|
+
"input": 1.32,
|
|
588
|
+
"output": 3.96,
|
|
589
|
+
"cacheRead": 0.044,
|
|
590
|
+
"cacheWrite": 1.32
|
|
591
|
+
},
|
|
460
592
|
"claude-opus-4-5-20251101": {
|
|
461
593
|
"input": 5,
|
|
462
594
|
"output": 25,
|
|
463
595
|
"cacheRead": 0.5,
|
|
464
596
|
"cacheWrite": 6.25,
|
|
465
|
-
"cacheWrite1h": 10.0
|
|
597
|
+
"cacheWrite1h": 10.0,
|
|
598
|
+
"bedrockRegionalMultiplier": 1.1
|
|
466
599
|
},
|
|
467
600
|
"claude-3-5-haiku-latest": {
|
|
468
601
|
"input": 0.8,
|
|
@@ -497,7 +630,8 @@
|
|
|
497
630
|
"output": 15,
|
|
498
631
|
"cacheRead": 0.3,
|
|
499
632
|
"cacheWrite": 3.75,
|
|
500
|
-
"cacheWrite1h": 6.0
|
|
633
|
+
"cacheWrite1h": 6.0,
|
|
634
|
+
"bedrockRegionalMultiplier": 1.1
|
|
501
635
|
},
|
|
502
636
|
"claude-3-5-haiku-20241022": {
|
|
503
637
|
"input": 0.8,
|
|
@@ -539,7 +673,8 @@
|
|
|
539
673
|
"output": 5,
|
|
540
674
|
"cacheRead": 0.1,
|
|
541
675
|
"cacheWrite": 1.25,
|
|
542
|
-
"cacheWrite1h": 2.0
|
|
676
|
+
"cacheWrite1h": 2.0,
|
|
677
|
+
"bedrockRegionalMultiplier": 1.1
|
|
543
678
|
},
|
|
544
679
|
"claude-3-opus-20240229": {
|
|
545
680
|
"input": 15,
|
|
@@ -700,6 +835,12 @@
|
|
|
700
835
|
"cacheRead": 0,
|
|
701
836
|
"cacheWrite": 0
|
|
702
837
|
},
|
|
838
|
+
"gemini-3-1-flash-image": {
|
|
839
|
+
"input": 0.5,
|
|
840
|
+
"output": 60,
|
|
841
|
+
"cacheRead": 0,
|
|
842
|
+
"cacheWrite": 0
|
|
843
|
+
},
|
|
703
844
|
"gemini-3-1-flash-lite-preview": {
|
|
704
845
|
"input": 0.5,
|
|
705
846
|
"output": 3,
|
|
@@ -988,6 +1129,26 @@
|
|
|
988
1129
|
"cacheRead": 0.1,
|
|
989
1130
|
"cacheWrite": 0
|
|
990
1131
|
},
|
|
1132
|
+
"kimi-k3": {
|
|
1133
|
+
"input": 3,
|
|
1134
|
+
"output": 15,
|
|
1135
|
+
"cacheRead": 0.3,
|
|
1136
|
+
"cacheWrite": 3,
|
|
1137
|
+
"cacheWrite1h": 6
|
|
1138
|
+
},
|
|
1139
|
+
"k3": {
|
|
1140
|
+
"input": 3,
|
|
1141
|
+
"output": 15,
|
|
1142
|
+
"cacheRead": 0.3,
|
|
1143
|
+
"cacheWrite": 3,
|
|
1144
|
+
"cacheWrite1h": 6
|
|
1145
|
+
},
|
|
1146
|
+
"kimi-k2-6": {
|
|
1147
|
+
"input": 0.95,
|
|
1148
|
+
"output": 4,
|
|
1149
|
+
"cacheRead": 0.16,
|
|
1150
|
+
"cacheWrite": 0.95
|
|
1151
|
+
},
|
|
991
1152
|
"kimi-k2-5": {
|
|
992
1153
|
"input": 0.6,
|
|
993
1154
|
"output": 3,
|
|
@@ -1018,39 +1179,59 @@
|
|
|
1018
1179
|
"cacheRead": 0,
|
|
1019
1180
|
"cacheWrite": 0
|
|
1020
1181
|
},
|
|
1182
|
+
"qwen3-coder-480b-a35b-v1": {
|
|
1183
|
+
"input": 0.45,
|
|
1184
|
+
"output": 1.8,
|
|
1185
|
+
"cacheRead": 0,
|
|
1186
|
+
"cacheWrite": 0
|
|
1187
|
+
},
|
|
1188
|
+
"qwen3-coder-30b-a3b-v1": {
|
|
1189
|
+
"input": 0.15,
|
|
1190
|
+
"output": 0.6,
|
|
1191
|
+
"cacheRead": 0,
|
|
1192
|
+
"cacheWrite": 0
|
|
1193
|
+
},
|
|
1021
1194
|
"claude-opus-4-7": {
|
|
1022
1195
|
"input": 5,
|
|
1023
1196
|
"output": 25,
|
|
1024
1197
|
"cacheRead": 0.5,
|
|
1025
1198
|
"cacheWrite": 6.25,
|
|
1026
|
-
"cacheWrite1h": 10.0
|
|
1199
|
+
"cacheWrite1h": 10.0,
|
|
1200
|
+
"bedrockRegionalMultiplier": 1.1
|
|
1027
1201
|
},
|
|
1028
1202
|
"claude-opus-4-8": {
|
|
1029
1203
|
"input": 5,
|
|
1030
1204
|
"output": 25,
|
|
1031
1205
|
"cacheRead": 0.5,
|
|
1032
1206
|
"cacheWrite": 6.25,
|
|
1033
|
-
"cacheWrite1h": 10.0
|
|
1207
|
+
"cacheWrite1h": 10.0,
|
|
1208
|
+
"bedrockRegionalMultiplier": 1.1
|
|
1034
1209
|
},
|
|
1035
1210
|
"claude-sonnet-4-7": {
|
|
1036
1211
|
"input": 3,
|
|
1037
1212
|
"output": 15,
|
|
1038
1213
|
"cacheRead": 0.3,
|
|
1039
1214
|
"cacheWrite": 3.75,
|
|
1040
|
-
"cacheWrite1h": 6.0
|
|
1215
|
+
"cacheWrite1h": 6.0,
|
|
1216
|
+
"bedrockRegionalMultiplier": 1.1,
|
|
1217
|
+
"estimated": true
|
|
1041
1218
|
},
|
|
1042
1219
|
"claude-sonnet-4-8": {
|
|
1043
1220
|
"input": 3,
|
|
1044
1221
|
"output": 15,
|
|
1045
1222
|
"cacheRead": 0.3,
|
|
1046
1223
|
"cacheWrite": 3.75,
|
|
1047
|
-
"cacheWrite1h": 6.0
|
|
1224
|
+
"cacheWrite1h": 6.0,
|
|
1225
|
+
"bedrockRegionalMultiplier": 1.1,
|
|
1226
|
+
"estimated": true
|
|
1048
1227
|
},
|
|
1049
1228
|
"claude-haiku-4-6": {
|
|
1050
1229
|
"input": 1,
|
|
1051
1230
|
"output": 5,
|
|
1052
1231
|
"cacheRead": 0.1,
|
|
1053
1232
|
"cacheWrite": 1.25,
|
|
1054
|
-
"cacheWrite1h": 2.0
|
|
1233
|
+
"cacheWrite1h": 2.0,
|
|
1234
|
+
"bedrockRegionalMultiplier": 1.1,
|
|
1235
|
+
"estimated": true
|
|
1055
1236
|
}
|
|
1056
1237
|
}
|