Bun's `mock.module()` is process-wide and is NOT undone by `mock.restore()`.
Two test files used module-level mocks that leaked across test runs,
silently breaking unrelated suites that imported the mocked modules
transitively:
- tests/unit/cliproxy/version-checker-stale-cache.test.ts mocked
binary/version-checker, contaminating cliproxy-stats-routes-install
and cliproxy-stats-routes-model-update suites that import a route
module which transitively imports version-checker.
- tests/unit/cliproxy/service-manager-startup.test.ts mocked 8 modules
at top level (binary-manager, stats-fetcher, etc.), contaminating any
later file that imports them.
CI happens to be green because file ordering on the GitHub runner places
victim files BEFORE contaminators in `bun test`. On Linux locally the
order is reversed, producing 6 reproducible test failures on every
`bun run test:fast` run. A change in OS, bun version, or new test files
that import the mocked modules could silently flip the CI runner's
order and surface these failures unexpectedly.
Replaced module-level mocks with explicit dependency-injection seams in
production code, following the existing pattern in version-checker.ts
and version-cache.ts (`fetchJsonFn?`, `fetchLatestVersionFn?`):
- src/cliproxy/types.ts: `BinaryManagerConfig.checkForUpdatesFn` (optional)
- src/cliproxy/binary/lifecycle.ts: route through new fn with default
- src/cliproxy/service-manager.ts: `ensureCliproxyService(deps?)` with
optional `ensureBinaryFn`, `detectRunningProxyFn`,
`configNeedsRegenerationFn`, `withStartupLockFn`
All deps fields are optional with real-implementation defaults, so
production callers are unchanged. Tests now inject deterministic stubs
through call-site parameters instead of module-level mocks.
Verified locally: \`bun run validate\` is now 2540 pass / 0 fail
(previously 2534 pass / 6 fail at the same upstream/main HEAD).
Built [OnSteroids](https://onsteroids.ai)
Add ANTHROPIC_EXTRA_MODELS env var to allow each API profile to
configure additional models alongside the primary ANTHROPIC_MODEL.
These are synced to CLIProxy config.yaml during ccs cliproxy sync.
- profile-mapper.ts: parse ANTHROPIC_EXTRA_MODELS on sync
- profile-writer.ts: write extra models to settings.json
- shared.ts + create-command.ts: --extra-models CLI flag
- profile-routes.ts + route-helpers.ts: REST API support
- profile-dialog.tsx + api-client.ts: frontend input
Anthropic exposes `max` as a distinct adaptive-thinking effort above
`xhigh` on Opus 4.7. Previously the validator aliased user input `max`
down to `xhigh`, so users couldn't reach the real top-tier effort
through CCS.
Extend the validator:
- Add `max` to VALID_THINKING_LEVELS and THINKING_LEVEL_RANK (rank 6,
above xhigh)
- Add `max` to THINKING_LEVEL_BUDGETS (65536, CCS-internal numeric
mapping for closest-level lookups)
- Widen ThinkingSupport.maxLevel union to include 'max'
The existing `max: 'xhigh'` alias in findClosestLevel is kept as a
graceful fallback for models whose levels list does not include `max`
(e.g. Codex `gpt-5.4`), because exact-match on validLevels takes
priority — so Opus 4.7 returns `max` directly while Codex still maps
`max` -> `xhigh`.
Update the claude.claude-opus-4-7 catalog entry to expose
`['low', 'medium', 'high', 'xhigh', 'max']` with `maxLevel: 'max'`.
Built [OnSteroids](https://onsteroids.ai)
Co-Authored-By: OnSteroids <built@onsteroids.ai>
Per Anthropic docs, Claude Opus 4.7 only supports adaptive thinking;
manual `thinking.type: "enabled"` with `budget_tokens` is rejected
with HTTP 400.
Switch the claude provider's `claude-opus-4-7` entry from
`type: 'budget'` to `type: 'levels'` with the effort tiers exposed
by the API: `low | medium | high | xhigh`. The proxy is expected to
translate these into `thinking.type: "adaptive"` with the effort
parameter.
Opus 4.6 and Sonnet 4.6 keep `type: 'budget'` for now since the
deprecated mode is still functional on those models.
Built [OnSteroids](https://onsteroids.ai)
Co-Authored-By: OnSteroids <built@onsteroids.ai>
The upstream router-for-me/CLIProxyAPIPlus repo was deleted, breaking any
install/update path that resolved backend: plus. Existing users with
`backend: plus` saved in config.yaml hit 404s on every bootstrap.
Changes:
- Flip DEFAULT_BACKEND from 'plus' to 'original' (platform-detector.ts)
- Flip default cliproxy.backend in createEmptyUnifiedConfig() to 'original'
- Runtime 404 fallback: getConfiguredBackend() degrades 'plus' -> 'original'
with a one-time warning, so existing installations keep working without a
manual reconfig step
- Update CLIProxyBackend docblock to document the fallback behavior
- Update tests to match new default
Retains the 'plus' type and BACKEND_CONFIG entry for forward compatibility
once CCS self-maintains its own Plus fork.
Closes#1062
The upstream router-for-me/CLIProxyAPIPlus repo was deleted, breaking any
install/update path that resolved backend: plus. Existing users with
`backend: plus` saved in config.yaml hit 404s on every bootstrap.
Changes:
- Flip DEFAULT_BACKEND from 'plus' to 'original' (platform-detector.ts)
- Flip default cliproxy.backend in createEmptyUnifiedConfig() to 'original'
- Runtime 404 fallback: getConfiguredBackend() degrades 'plus' -> 'original'
with a one-time warning, so existing installations keep working without a
manual reconfig step
- Update CLIProxyBackend docblock to document the fallback behavior
- Update tests to match new default
Retains the 'plus' type and BACKEND_CONFIG entry for forward compatibility
once CCS self-maintains its own Plus fork.
Closes#1062
- model-catalog: change `claude-opus-4-7` description from "Latest
flagship without thinking" to "Latest flagship model". The model
supports thinking budget (min 1024, max 128000) but doesn't enable
it by default; the old wording implied no thinking support, which
was misleading. Aligns with the `claude` provider's description.
- generator: add DEFAULT_ANTIGRAVITY_ALIASES entry for non-thinking
`claude-opus-4-7`, restoring symmetry with `claude-sonnet-4-6`
(which has both -thinking and non-thinking aliases). Bump
CLIPROXY_CONFIG_VERSION 18 → 19 to trigger regeneration on upgrade.
Addresses PResto atrvd/ccs#8 issues #2 (important) and #3 (suggestion).
Built [OnSteroids](https://onsteroids.ai)
Addresses PResto review (atrvd/ccs#8, issue #1): bumping
CLIPROXY_CONFIG_VERSION 17→18 was missing a changelog entry in the
header comment. Adds the v18 line to preserve regeneration history.
Built [OnSteroids](https://onsteroids.ai)
Adds Claude Opus 4.7 as a new model to the AGY (Antigravity) and Claude
provider catalogs, with pricing, Cursor IDE support, and updated defaults
across the codebase.
- Add claude-opus-4-7-thinking and claude-opus-4-7 to AGY catalog
(defaultModel bumped to claude-opus-4-7-thinking)
- Add claude-opus-4-7 entry to Claude provider catalog
- Register claude-opus-4-7-thinking fork alias in CLIProxy config
(CLIPROXY_CONFIG_VERSION bumped 17 -> 18)
- Add pricing for claude-opus-4-7 and claude-opus-4-7-thinking
($5/$25 per million, matching Opus 4.6)
- Add claude-4.7-opus and claude-4.7-opus-fast-mode to Cursor catalog
- Update ANTHROPIC_DEFAULT_OPUS_MODEL in base-claude settings to 4.7
- Update Droid adapter and code-reviewer fallback models to 4.7
- Update unit tests for model-catalog and model-pricing
Opus 4.6 is retained as a supported fallback in both catalogs.
Built [OnSteroids](https://onsteroids.ai)
Use ComSpec-aware shell selection for escaped wrapper launches.
Apply it to the remaining Windows Claude launch paths.
Rewrite the Codex exec regression test to use scoped spies so the full suite stays isolated.
- capture the resolved local cliproxy config/auth paths before regenerating
routing strategy config
- thread explicit override paths into regenerateConfig so scoped config writes
stay deterministic during the full test suite
- add regression coverage for explicit config path overrides
- skip managed Claude browser attach when the default CCS browser profile
directory has not been created yet
- keep explicit env override flows failing fast so real misconfiguration still
surfaces clearly
- add regression coverage for default and settings-profile launches
- skip CLIProxy auto-update checks on runtime bootstrap paths
- fail fast when local startup needs a missing binary instead of attempting installs
- add regression coverage for dashboard limited mode and startup test isolation