Commit Graph
1073 Commits
Author SHA1 Message Date
Sergey Galuza 1fc595f10c docs(pricing): document legacy 4-7-thinking entry; cover tier metadata
Final review polish:

- Add an inline comment on the claude-opus-4-7-thinking registry entry
  explaining it is a pricing-only id kept for historical analytics data
  (no catalog model after Opus 4.7 moved to adaptive thinking levels),
  and why it carries no fast tier.
- Add a test asserting applyServiceTier preserves the serviceTiers map on
  its result, guarding against a future simplification dropping it.

Built [OnSteroids](https://onsteroids.ai)
2026-05-31 20:23:14 +02:00
Sergey Galuza 5a79b47506 fix(pricing): restore opus version order; cover 4.6/4.7 fast-tier rates
Address presto review on the fast-tier work:

- Move the claude-opus-4-8 entry after claude-opus-4-7-thinking so the
  registry keeps chronological 4.6 -> 4.7 -> 4.8 ordering (the 4.8 insert
  had split the 4-7 / 4-7-thinking pair).
- Drop the fast serviceTier from claude-opus-4-7-thinking: that id is a
  legacy pricing-only entry with no catalog model, so a fast premium on it
  is meaningless. The active 4.6-thinking variant (agy provider) keeps its
  fast tier.
- Extend the 4.7 fast-tier test with cache-rate assertions and add an
  equivalent 4.6 fast-tier test so the derived buildRates math is covered
  for every premium-tier model.

Built [OnSteroids](https://onsteroids.ai)
2026-05-31 18:52:54 +02:00
Sergey Galuza 254fc88f71 refactor(pricing): derive fast-tier cache rates via buildRates helper
Address review feedback on the per-service-tier pricing:

- Extract `buildRates(input, output)` plus named CACHE_5M_WRITE_MULTIPLIER
  / CACHE_READ_MULTIPLIER constants so fast-tier cache rates are derived
  from Anthropic's documented multipliers instead of hand-computed numbers.
  This removes the inconsistency where Opus 4.6 fast-tier lacked the
  explanatory inline comments that 4.7/4.8 carried (presto suggestion #3).
- Document in `applyServiceTier` that no production caller passes
  `serviceTier` yet (Anthropic's service_tier is not captured on
  CliproxyRequestDetail), so fast-mode usage is currently billed at the
  standard rate until the usage pipeline records the tier.
- Add a combined date-suffix + fast-tier lookup test to prove the two
  resolution stages compose.

Built [OnSteroids](https://onsteroids.ai)
2026-05-31 10:34:50 +02:00
Sergey Galuza c74ad22bd4 Merge remote-tracking branch 'upstream/dev' into feat/claude-opus-4-8 2026-05-30 22:31:55 +02:00
Sergey Galuza 878775f5b6 feat(pricing): support per-service-tier rates; wire Opus fast mode
Extend `ModelPricing` with an optional `serviceTiers` map keyed by
Anthropic's `service_tier` request parameter. `getModelPricing(model,
{ serviceTier })` returns the matching tier rates when present and
transparently falls through to base rates otherwise — existing call
sites keep current behavior.

Registry entries added (per Anthropic Fast mode pricing docs):
- claude-opus-4-8 fast: $10/$50 input/output (2x premium)
- claude-opus-4-7 fast: $30/$150 (6x premium)
- claude-opus-4-6 fast: $30/$150 (6x premium)

Cache rates derived from the documented Prompt caching multipliers
(1.25x for 5-min cache write, 0.1x for cache read).

Note: tier tracking through CliproxyRequestDetail is not wired yet —
that's a follow-up so usage transformers can pass `serviceTier` when
Anthropic returns it on the response. Schema is in place; integration
can land independently.

Also adds a defensive `claude-opus-4-8-20260530` pricing test to exercise
`stripDateSuffix` even though Anthropic no longer issues date-stamped IDs
for the 4.6+ generation (addresses presto-review suggestion #1).

Built [OnSteroids](https://onsteroids.ai)
2026-05-30 22:17:21 +02:00
Tam Nhu Tran ced9317565 Merge remote-tracking branch 'origin/dev' into codex/fix-cliproxy-v3-snapshot-migration-issue
# Conflicts:
#	src/web-server/usage/cliproxy-usage-transformer.ts
#	tests/unit/web-server/cliproxy-usage-transformer.test.ts
2026-05-30 16:13:49 -04:00
Kai (Tam Nhu) TranandGitHub dce968fdf7 Merge pull request #1425 from kaitranntt/codex/fix-unvalidated-codex-quota-labels
fix(cliproxy): sanitize Codex quota labels
2026-05-30 16:12:22 -04:00
Kai (Tam Nhu) TranandGitHub e2d487883f Merge pull request #1430 from kaitranntt/codex/fix-vulnerability-in-shell-completion-scripts
fix: avoid relative completion backend execution
2026-05-30 16:12:15 -04:00
Kai (Tam Nhu) TranandGitHub e7db1d65f5 Merge pull request #1452 from kaitranntt/codex/propose-fix-for-codex-target-rejection
Mark Codex as a persisted target and align UI/validation
2026-05-30 16:12:03 -04:00
Kai (Tam Nhu) TranandGitHub 5ca9b7b1e2 Merge pull request #1448 from kaitranntt/codex/fix-browser-page-open/close-handlers
fix(browser): handle DevTools close endpoint response
2026-05-30 16:09:17 -04:00
Kai (Tam Nhu) TranandGitHub d028329d2c Merge pull request #1426 from kaitranntt/codex/fix-cliproxy-usage-cache-vulnerability
fix(cliproxy): avoid persisting account identifiers and harden usage cache permissions
2026-05-30 16:08:26 -04:00
Kai (Tam Nhu) TranandGitHub bbb717ff2f Merge pull request #1441 from kaitranntt/codex/propose-fix-for-provider-alias-crash
fix: harden provider alias normalization
2026-05-30 16:07:28 -04:00
Kai (Tam Nhu) TranandGitHub 1d1b9fbe6d Merge pull request #1443 from kaitranntt/codex/fix-ccsxp-codex-config-check
fix(codex): gate ccsxp config overrides
2026-05-30 16:07:21 -04:00
Kai (Tam Nhu) TranandGitHub 41e550e92f Merge pull request #1428 from kaitranntt/codex/propose-fix-for-symlinked-cleanup-issue
fix: reject symlinked cleanup directories
2026-05-30 16:05:05 -04:00
Kai (Tam Nhu) TranandGitHub 43046f3047 Merge pull request #1455 from kaitranntt/codex/propose-fix-for-overbroad-issue-parsing
fix(ci): narrow issue reference parsing
2026-05-30 16:04:57 -04:00
Kai (Tam Nhu) TranandGitHub 5ac0e808b4 Merge pull request #1432 from kaitranntt/codex/fix-ccsxp-argument-parsing-bug
fix: stop ccsxp model alias parsing at option terminator
2026-05-30 16:01:55 -04:00
Kai (Tam Nhu) TranandGitHub ee50c0c59a Merge pull request #1422 from kaitranntt/codex/fix-codex-usage-cache-permissions
fix: restrict Codex usage cache permissions
2026-05-30 16:01:00 -04:00
Kai (Tam Nhu) TranandGitHub 4ab920c489 Merge pull request #1438 from kaitranntt/codex/fix-invalid-default-claude-image-analysis-model
fix: correct claude image analysis default model
2026-05-30 15:55:41 -04:00
Kai (Tam Nhu) TranandGitHub 57867ff8f0 Merge pull request #1445 from kaitranntt/codex/propose-fix-for-opus-4.7-test-coverage
fix(analytics): price Claude Opus 4.7 thinking
2026-05-30 15:53:40 -04:00
Kai (Tam Nhu) TranandGitHub 484f0a0427 Merge pull request #1427 from kaitranntt/codex/propose-fix-for-local-runtime-probe-vulnerability
fix: restrict local runtime readiness probes
2026-05-30 15:51:43 -04:00
Kai (Tam Nhu) TranandGitHub 5151d6d24e Merge pull request #1433 from kaitranntt/codex/fix-issue-with-profile-query-handling
fix: validate usage profile query type
2026-05-30 15:46:47 -04:00
Kai (Tam Nhu) TranandGitHub 93756489a5 Merge pull request #1434 from kaitranntt/codex/fix-unbounded-recursion-in-receipt-generation
fix(persist): bound Codex translator receipt scan
2026-05-30 15:46:29 -04:00
Kai (Tam Nhu) TranandGitHub 84f2856990 Merge pull request #1444 from kaitranntt/codex/propose-fix-for-test-cleanup-issue
test: restrict claudecode CCS_HOME cleanup
2026-05-30 15:46:08 -04:00
Kai (Tam Nhu) TranandGitHub 5619f32651 Merge pull request #1447 from kaitranntt/codex/fix-pid-only-proxy-cleanup-issue
fix(proxy): load pid-only profile daemon state
2026-05-30 15:45:50 -04:00
Kai (Tam Nhu) TranandGitHub 1333407f54 Merge pull request #1456 from kaitranntt/codex/fix-broken-symlink-handling-in-plugin-setup
fix(management): skip broken shared plugin entries
2026-05-30 15:45:37 -04:00
Tam Nhu Tran f93cb36da6 fix: surface cleanup directory read errors 2026-05-30 15:40:31 -04:00
Kai (Tam Nhu) TranandTam Nhu Tran 2a3bc6807f fix(ci): narrow issue reference parsing 2026-05-30 15:39:34 -04:00
Tam Nhu Tran a0870aa404 fix(cliproxy): fall back from invalid Codex feature labels 2026-05-30 15:38:50 -04:00
Kai (Tam Nhu) TranandGitHub f815db391d Merge pull request #1308 from simonsmh/feat/add-qoder-provider
feat(cliproxy): Qoder provider
2026-05-30 15:35:55 -04:00
Kai (Tam Nhu) TranandGitHub 9eb0201b79 fix(codex-auth): narrow running Codex detection 2026-05-30 15:29:17 -04:00
Kai (Tam Nhu) TranandTam Nhu Tran 062e77e55f fix(analytics): price Claude Opus 4.7 thinking 2026-05-30 15:20:44 -04:00
Kai (Tam Nhu) TranandTam Nhu Tran 88421026c6 fix: correct claude image analysis default model 2026-05-30 15:20:36 -04:00
Kai (Tam Nhu) TranandTam Nhu Tran 5da6334736 fix(persist): bound Codex translator receipt scan 2026-05-30 15:20:22 -04:00
Kai (Tam Nhu) TranandTam Nhu Tran 901bad2ec7 fix: validate usage profile query type 2026-05-30 15:20:15 -04:00
Kai (Tam Nhu) TranandTam Nhu Tran 5776e9c3b1 fix: stop ccsxp model alias parsing at option terminator 2026-05-30 15:20:08 -04:00
Kai (Tam Nhu) TranandTam Nhu Tran 4f2dd70b8c fix: avoid relative completion backend execution 2026-05-30 15:19:59 -04:00
Kai (Tam Nhu) TranandTam Nhu Tran 9a7b26eab7 fix: restrict local runtime readiness probes 2026-05-30 15:19:38 -04:00
Kai (Tam Nhu) TranandTam Nhu Tran 6bba193cdd fix: harden cliproxy usage cache 2026-05-30 15:18:11 -04:00
Kai (Tam Nhu) TranandTam Nhu Tran c630ce878e fix: restrict Codex usage cache permissions 2026-05-30 15:17:13 -04:00
Kai (Tam Nhu) Tran f44b651cd6 fix(management): skip broken shared plugin entries 2026-05-30 14:57:17 -04:00
Kai (Tam Nhu) Tran 04dc97aaa4 fix: persist codex target selections 2026-05-30 14:57:07 -04:00
Kai (Tam Nhu) Tran 92252189b1 fix(browser): handle DevTools close endpoint response 2026-05-30 14:56:49 -04:00
Kai (Tam Nhu) Tran 216fae7d57 fix(proxy): load pid-only profile daemon state 2026-05-30 14:56:46 -04:00
Kai (Tam Nhu) Tran 6671423d79 test: restrict claudecode CCS_HOME cleanup 2026-05-30 14:56:30 -04:00
Kai (Tam Nhu) Tran e09e930c38 fix(codex): gate ccsxp config overrides 2026-05-30 14:56:21 -04:00
Kai (Tam Nhu) Tran 65adab5bec fix: normalize cliproxy v3 usage snapshots 2026-05-30 14:56:18 -04:00
Kai (Tam Nhu) Tran 480f3ba469 fix: harden provider alias normalization 2026-05-30 14:56:17 -04:00
Kai (Tam Nhu) Tran 920fba7e13 fix: reject symlinked cleanup directories 2026-05-30 14:53:59 -04:00
Kai (Tam Nhu) Tran 457412277b fix(cliproxy): sanitize Codex quota labels 2026-05-30 14:53:53 -04:00
Kai (Tam Nhu) TranandGitHub aee322ea88 fix: compare cliproxy fork release suffixes (#1419) 2026-05-30 13:42:31 -04:00