Commit Graph

254 Commits

  • Rename OpenCode Go preset to drop model suffix
    Simplify the display name from "OpenCode Go (DeepSeek V4 Flash)" to
    "OpenCode Go" in both the Claude Code and Claude Desktop preset lists.
  • Add referral param to ShengSuanYun website links
    The websiteUrl for ShengSuanYun presets pointed at the bare domain while
    only apiKeyUrl carried the from=CH_4HHXMRYF referral code. Append the same
    referral param to websiteUrl across all provider presets so the in-app
    'open website' jump is also attributed to the channel.
  • Update default models and pricing across presets
    Bump default model names project-wide: gpt-5.4 -> gpt-5.5,
    gemini-3.x -> gemini-3.5-flash, glm-5 -> glm-5.1, and
    grok-code-fast-1 -> grok-build-0.1 across all provider presets
    (claude, codex, gemini, hermes, openclaw, opencode, universal),
    Gemini config, and stream check defaults.
    
    Pricing:
    - Seed gemini-3.5-flash, gemini-3.1-flash-lite, step-3.5-flash-2603,
      doubao-seed-2.0-code, mimo-v2.5(/pro), qwen3-coder-480b, grok-build-0.1.
    - Correct deepseek-v4-flash/pro, glm-5/5.1, grok pricing.
    - Add repair_current_model_pricing: idempotent pass that fixes only
      rows still equal to the outdated built-in values, preserving any
      user-customized prices (seed uses INSERT OR IGNORE and cannot update
      existing rows).
    
    Fixes from review:
    - opencode: drop duplicate gemini-3.5-flash variant (unreachable via
      .find), keep the entry with the full minimal/low/medium/high set.
    - Align stale display names/costs to gemini-3.5-flash (hermes, openclaw,
      opencode); openclaw cost -> {1.5, 9, 0.15} to match seed.
    - i18n (zh/en/ja/zh-TW): refresh OMO category tooltips for new model
      names; fix writing tooltip to Kimi K2.5 to match its recommended.
    
    Update tests accordingly and add a regression test asserting unique
    model ids in the Google opencode preset variants.
  • Upgrade default Claude Opus model to 4.8
    Bump the default Opus route/model from claude-opus-4-7 to claude-opus-4-8
    across provider presets (claude, claudeDesktop, hermes, openclaw, opencode,
    universal), i18n locales (zh/en/ja/zh-TW), pricing seed data, and the
    user-manual docs.
    
    - Add claude-opus-4-8 pricing row ($5/$25/$0.50/$6.25); keep the 4-7 row
      for historical usage stats (seeded via INSERT OR IGNORE).
    - Claude Desktop proxy: accept bidirectional opus 4-7 <-> 4-8 route alias
      during rollout so previously saved routes keep resolving.
    - thinking_optimizer: route opus-4-8 through adaptive thinking and normalize
      dotted model ids (also fixes dotted 4-6/4-7 falling back to legacy).
    - usage_stats: normalize Bedrock/Vertex/aggregator opus-4-8 ids to base
      pricing.
    
    Also merge role:"system" messages into the Gemini systemInstruction in the
    Anthropic->Gemini transform.
  • refactor: replace JSON deep copy with deepClone helper and extract useTauriEvent hook (#3140)
    * refactor: replace JSON.parse(JSON.stringify()) with structuredClone and extract useTauriEvent hook
    
    Replace all `JSON.parse(JSON.stringify())` deep copy patterns with native
    `structuredClone()` across production source (9 occurrences), tests (11
    occurrences), and a hand-rolled `deepClone` utility in providerConfigUtils.ts.
    Add "ES2022" to tsconfig lib for type support.
    
    Extract a `useTauriEvent` hook to eliminate the repeated Tauri event listener
    boilerplate (`useEffect` + `active/disposed` flag + async `listen`) that was
    duplicated across App.tsx (3 listeners) and useUsageCacheBridge.ts. The hook
    handles async registration, race-condition guards, and cleanup automatically.
    
    * fix: add compatible deepClone helper
    
    - Add a shared deepClone helper with a structuredClone runtime guard and fallback.
    - Route clone call sites through the helper.
    - Preserve universal-provider-synced listener ordering and drop the dead-directory diff.
    
    * fix: harden Tauri event handling
    
    - Guard WebDAV sync status events against missing payloads.
    - Preserve settings query invalidation ordering before showing auto-sync errors.
    - Simplify useTauriEvent subscriptions to avoid dependency-driven re-listens.
    
    ---------
    
    Co-authored-by: zcb <zhangchongbiao@qiyuanlab.com>
    Co-authored-by: Jason <farion1231@gmail.com>
  • fix: sync Claude Desktop profile during proxy takeover (#3157)
    * fix: sync Claude Desktop profile during proxy takeover
    
    * fix(provider): skip Claude Desktop backup refresh during takeover
    
    - Route Claude Desktop takeover updates directly through the 3P profile writer.
    - Keep takeover startup backup state unchanged when provider metadata changes.
    - Narrow platform-specific test helpers and environment setup with cfg gates.
    
    * fix(provider): restore PathBuf import for CI tests
    
    - Restore an unconditional PathBuf import for provider tests.
    
    - Keep Linux cargo test builds compiling while preserving Claude Desktop cfg-gated helpers.
    
    ---------
    
    Co-authored-by: Jason <farion1231@gmail.com>
  • chore(sponsors): drop AICoding partner from README, presets and i18n
    Remove AICoding (aicoding.sh) sponsor entry from the three README files
    and the provider preset across all seven app_types (claude, codex,
    gemini, hermes, opencode, openclaw, claudeDesktop). Also drop the
    matching partner_promotion.aicoding string in zh/en/ja locales.
    
    The icon (src/icons/extracted/index.ts) and the legacy provider id in
    codex_history_migration.rs are kept intentionally: the former for
    possible later re-use, the latter so existing users' Codex history
    still gets bucketed into "custom" on upgrade.
  • feat: adaptive reasoning detection for Codex Chat providers
    Auto-detect each Chat-routed Codex provider's reasoning interface from
    its name, base URL, and model, then inject the matching thinking
    parameter without manual configuration:
    
    - Platform-first inference (OpenRouter, SiliconFlow) overrides model
      rules, since the same model exposes different reasoning controls
      depending on the hosting platform.
    - Effort tiers are forwarded only to providers that support them
      (DeepSeek, OpenRouter, and StepFun's step-3.5-flash-2603); on/off-only
      providers (Kimi, GLM, Qwen, MiniMax, MiMo, SiliconFlow) drop the level
      instead of sending a field the upstream rejects.
    - OpenRouter uses the native reasoning:{effort} object, clamps max to
      xhigh (its enum has no max), and forwards an explicit effort:"none" so
      reasoning can be turned off.
    - StepFun falls back to inference so per-model effort support is honored
      (the static preset would have forced effort on step-3.5-flash too).
    
    Includes the Codex provider-form reasoning controls, i18n strings
    (zh/en/ja), and response-side reasoning extraction.
  • feat: remove Kimi For Coding preset from Codex
    The Kimi For Coding preset pins users to a single coding-only model
    (kimi-for-coding), restricting model selection. Drop it from the Codex
    presets and trim the corresponding row in the trilingual user manual.
    The general Kimi preset (Moonshot platform) is kept, and presets for
    other apps are unchanged.
  • fix: reclassify ClaudeAPI as aggregator to re-enable model test
    ClaudeAPI supports the health/stream check, but the third_party
    category triggers the isClaudeThirdParty gate in ProviderCard that
    disables the model test button for third-party Claude providers.
    Recategorizing as aggregator restores the test action; the partner
    star is unaffected since it is driven by isPartner, not category.
    
    Applied to both the Claude Code and Claude Desktop presets.
  • feat: add Chat Completions routing for 22 Codex third-party presets
    Enable openai_chat routing with explicit model catalogs across the major
    Chinese/Asian providers (DeepSeek, Zhipu GLM, Kimi, MiniMax, Baidu Qianfan,
    Bailian, StepFun, Volcengine Agent Plan, BytePlus, DouBaoSeed, ModelScope,
    Longcat, BaiLing, Xiaomi MiMo, SiliconFlow, Novita AI, Nvidia, etc.). Each
    preset declares its context window so the UI can size catalog rows when the
    preset is picked.
    
    Also lands two consistency fixes uncovered along the way:
    - Include setCodexCatalogModels in resetCodexConfig's useCallback deps to
      match the new third parameter it consumes.
    - Realign TheRouter Codex test to the "custom" model_provider bucket
      established by the recent third-party unification; the previous assertion
      predated that refactor and had been failing on HEAD.
  • feat: unify Codex third-party providers into stable "custom" history bucket
    Codex filters resume history by `model_provider`, so switching between
    provider-specific ids like `rightcode` and `aihubmix` made past sessions
    appear to vanish. Collapse all third-party providers into a single
    stable bucket so cross-switch history stays visible.
    
    - Normalize live `model_provider` to "custom" on every Codex write
      (reserved built-in ids like openai/ollama are preserved).
    - Add device-level one-shot migration that rewrites historical JSONL
      session files and the `state_5.sqlite` threads table from legacy
      provider ids into the "custom" bucket. Backs up originals under
      `~/.cc-switch/backups/codex-history-provider-migration-v1/` and uses
      the SQLite Backup API for the state DB.
    - Record completion in `settings.json` under `localMigrations` so the
      migration is strictly idempotent across launches.
    - Update Codex provider preset templates to emit `model_provider = "custom"`
      out of the box.
  • Add Chat Completions routing for Codex providers
    - Add a Codex API format selector and routing badge for Chat Completions providers.
    - Convert Codex Responses requests to upstream Chat Completions when routing is required.
    - Convert Chat Completions JSON and SSE responses back to Responses format.
    - Keep generated Codex wire_api values on Responses for Codex compatibility.
    - Add i18n labels, provider metadata handling, and focused conversion tests.
  • chore: remove LionCC sponsor and presets
    - Remove LionCC sponsor entry from all README files (en/zh/ja)
    - Remove LionCCAPI presets from all provider configs
    - Remove lionccapi i18n keys from all locales
    - Keep lioncc.png icon file as requested
  • feat: add Xiaomi MiMo Token Plan presets (#2803)
    * feat: add Xiaomi MiMo token plan presets
    
    * fix: update Xiaomi MiMo provider presets
    
    * fix: align MiMo V2.5 model specs with official documentation
    
    - Update maxTokens from 32000 to 131072 (128K) for mimo-v2.5-pro and mimo-v2.5
    - Update contextWindow from 262144 to 1048576 (1M) for mimo-v2.5
    - Aligns with official specs from Xiaomi MiMo documentation
    - Ensures consistency between OpenClaw and OpenCode presets
    
    ---------
    
    Co-authored-by: Jason <farion1231@gmail.com>
  • Add Claude Desktop official preset
    - Add Claude Desktop Official to the Claude Desktop preset list.
    - Treat selected official presets as official mode in the form.
    - Cover the official preset with a preset-order regression test.
  • refactor(presets): render presets in array order and prioritize partners
    Remove the category-based grouping logic from ProviderPresetSelector,
    letting the array position in each preset config file be the single
    source of truth for display order. Move partner presets (PatewayAI,
    火山Agentplan, BytePlus, DouBaoSeed) right after Shengsuanyun across
    all 6 config files so they appear earlier in the UI.
  • feat(presets): add BytePlus provider preset as partner
    Add BytePlus (international Volcengine) to Claude, Claude Desktop,
    Hermes, OpenCode, and OpenClaw with byteplus icon, 256K context window,
    and trilingual promotion text.
  • feat(presets): add 火山Agentplan provider preset as partner
    Add Volcengine Ark Agentplan to Claude, Claude Desktop, Hermes,
    OpenCode, and OpenClaw with huoshan icon and trilingual promotion.
  • chore(presets): update DouBaoSeed endpoint, links, and add as partner
    Switch Anthropic-format base URL from /api/coding to /api/compatible,
    update website/apiKey URLs to Volcengine console with tracking params,
    and promote DouBaoSeed to partner with trilingual promotion text.
  • chore(presets): switch RelaxyCode icon to custom relaxcode.png
    Replace the generic claude icon with a dedicated relaxcode.png icon
    for the RelaxyCode provider presets.
  • feat(presets): add RelaxyCode provider presets
    Add RelaxyCode as a new third-party provider with support for:
    - Claude Code preset (Anthropic native protocol)
    - Codex preset (gpt-5.5 model)
    - Claude Desktop preset (direct mode with passthrough routes)
    
    RelaxyCode is an enterprise-grade AI programming platform providing
    unified access to Claude Code, Codex, and Gemini CLI models.
  • feat(presets): add RunAPI provider presets
    Add RunAPI as a new partner provider with support for:
    - Claude Code preset (Anthropic native protocol)
    - Codex preset (gpt-5.5 model)
    - Claude Desktop preset (direct mode with passthrough routes)
    - OpenCode preset (@ai-sdk/anthropic)
    - OpenClaw preset (anthropic-messages protocol)
    - Hermes preset (anthropic_messages mode)
    - Icon configuration (runapi.jpg)
    - i18n support (zh/en/ja) with ¥14 free credit promotion
    
    RunAPI is a high-performance AI model API gateway supporting 150+
    mainstream models (OpenAI, Claude, Gemini, DeepSeek, Grok) with
    prices as low as 10% of official rates.
  • feat(presets): add ClaudeCN provider presets
    Add ClaudeCN as a new partner provider with support for:
    - Claude Code preset (Anthropic native protocol)
    - Codex preset (gpt-5.5 model)
    - Claude Desktop preset (direct mode with passthrough routes)
    - OpenCode preset (@ai-sdk/anthropic)
    - OpenClaw preset (anthropic-messages protocol)
    - Hermes preset (anthropic_messages mode)
    - Icon configuration (claudecn.png)
    - i18n support (zh/en/ja) with enterprise service promotion
    
    ClaudeCN is an enterprise-grade AI gateway operated by a registered
    company, supporting enterprise procurement processes with corporate
    payments, contracts, and compliance guarantees.
  • feat(presets): add ClaudeAPI provider presets
    Add ClaudeAPI as a new partner provider with support for:
    - Claude Code preset (using ANTHROPIC_AUTH_TOKEN field)
    - Claude Desktop preset (direct mode with passthrough routes)
    - Icon configuration (ClaudeApi.png)
    - i18n support (zh/en/ja) with test credit promotion
    
    ClaudeAPI provides official Anthropic API keys and AWS Bedrock
    routing with support for Tool Use and 1M context.
  • refactor(presets): switch 20 Claude Desktop providers from proxy to direct mode
    - Change mode from "proxy" to "direct" for 20 third-party/aggregator providers
    - Simplify PipeLLM from mappedRoutes to passthroughRoutes for consistency
    - Reduces unnecessary proxy layer overhead for providers that support direct API calls
    
    Affected providers: ShengSuanYun, AIHubMix, DMXAPI, PackyAPI, PatewayAI,
    Cubence, AIGoCode, RightCodes, AICodeMirror, AICoding, CrazyRouter,
    SSSAICode, ModelVerse, CompShare, MicuAPI, CTOK, E-FlowCode,
    VibeCodingAPI, LemonData, PipeLLM
  • feat(presets): add PatewayAI provider presets
    Add PatewayAI as a new partner provider with support for:
    - Claude Code preset (using ANTHROPIC_API_KEY field)
    - Codex preset (gpt-5.5 model)
    - Claude Desktop preset (proxy mode with passthrough routes)
    - Icon configuration (pateway.jpg)
    - i18n support (zh/en/ja) with $3 registration bonus promotion
    
    PatewayAI provides reliable API routing services for Claude Code,
    Codex, and Gemini models.
  • chore(presets): migrate OpenClaudeCode to MicuAPI domain
    Replace all openclaudecode.cn URLs with micuapi.ai across all
    provider presets (Claude, Codex, Hermes, OpenClaw, OpenCode,
    Claude Desktop). This includes website URLs, API key URLs, and
    base URLs.
  • chore(presets): update CrazyRouter API endpoints to cn subdomain
    Update all CrazyRouter baseURL configurations from crazyrouter.com
    to cn.crazyrouter.com across all supported applications (Claude,
    Codex, Gemini, Hermes, OpenClaw, OpenCode, Claude Desktop).
    
    Website and registration URLs remain unchanged.
  • chore(partners): remove DDSHub partner integration
    Remove DDSHub from all provider presets (Claude, Claude Desktop, Codex, Hermes),
    i18n files (zh/en/ja), README docs, and icon system. Physical assets retained for
    potential future restoration.
  • refactor(claude-desktop): lock route IDs to sonnet/opus/haiku roles
    Adapt to Claude Desktop 1.6259.1+ fail-all validation which only
    accepts claude-(sonnet|opus|haiku)-* route IDs. Branded model names
    (DeepSeek, Kimi, GLM, etc.) now live in a new labelOverride field
    instead of being embedded in route IDs.
    
    - Backend auto-repairs legacy unsafe routes to the next free
      sonnet/opus/haiku slot instead of erroring
    - Frontend swaps the free-form route input for a role dropdown plus
      menu display name field
    - Add CLAUDE_DESKTOP_ROLE_ROUTE_IDS as the single source of truth
      for role-to-route mapping; presets and form both consume it
    - Drop the dead displayName alias on ClaudeDesktopModelRoute and the
      ineffective /v1/models display_name injection (UI ignores it)
    - Update i18n (en/ja/zh) and form focus test for the new fields
  • - 支持 Claude Desktop 使用 Copilot/Codex OAuth 供应商
    - 放开本地路由托管 OAuth 供应商校验,允许动态 Token
    - 新增 Claude Desktop Copilot/Codex 预设与账号选择
    - 添加 OAuth proxy 回归测试
  • refactor(claude-desktop): drop displayName from model route schema
    Claude Desktop's new model menu reads model IDs directly and ignores the
    display_name field, so a separate displayName slot added UI noise without
    any product value. Collapse the routeId / model / displayName tuple down
    to routeId / model, and let the route ID carry the user-visible name
    through a non-editable claude- prefix rendered next to the input.
    
    Drop display_name from ClaudeDesktopModelRoute, ClaudeDesktopDefaultRoute,
    and ResolvedModelRoute on the Rust side plus the matching TS interfaces,
    stop emitting it in /v1/models responses, derive route IDs from upstream
    model IDs when picked via the model dropdown, and update zh/en/ja copy to
    describe the new two-field layout.
  • - fix(ci): restore frontend formatting and Linux clippy
    - Format Claude Desktop provider presets with Prettier
    
    - Gate platform-specific Claude Desktop path helpers behind cfg
  • feat(claude-desktop): add 44 provider presets translated from Claude Code
    - New src/config/claudeDesktopProviderPresets.ts with the Claude Code
      preset list re-shaped into Desktop's three-segment route format
      (routeId / upstreamModel / displayName); excludes OAuth providers,
      AWS Bedrock (no SigV4 support) and KAT-Coder (placeholder URL).
    - Non-Claude upstream presets show upstream model id as displayName
      (e.g. deepseek-v4-pro) so the Desktop model list reflects what is
      actually being requested. OpenRouter/TheRouter/PIPELLM keep
      Sonnet/Opus/Haiku since their upstream really is Anthropic Claude.
    - Wire ProviderPresetSelector into ClaudeDesktopProviderForm so
      selecting a preset back-fills baseUrl, mode, routes and apiFormat.
    - Drop the hard-coded ANTHROPIC_AUTH_TOKEN write in handleSubmit so
      ANTHROPIC_API_KEY presets (LemonData / AiHubMix / Gemini Native)
      save under the correct env key, and clear the opposite key on switch.
    - Hide the universal-providers tab for claude-desktop because its
      meta-driven routing has no analogue in the universal flat-env shape.
    - Add apps."claude-desktop" i18n key (zh/en/ja) so the dialog tab
      label resolves instead of showing the literal key.
  • feat(claude-desktop): add 3P provider switching with proxy gateway
    Adds a new ClaudeDesktop AppType that writes Claude Desktop's third-party
    inference profile under configLibrary/, sharing _meta.json with other
    launchers (Ollama-compatible) so cc-switch can coexist with them.
    
    Two switch modes:
    - direct: provider already exposes claude-* / anthropic/claude-* model
      ids on Anthropic Messages, Claude Desktop connects to it directly.
    - proxy: cc-switch's local proxy acts as the inference gateway,
      presenting only claude-* route names to Claude Desktop and mapping
      them to real upstream models. Required after Anthropic restricted
      Claude Desktop to claude-family ids.
    
    Backend:
    - New module claude_desktop_config with snapshot/rollback, official seed
      bypass, /claude-desktop/v1/{models,messages} routes, and a single
      source of truth for default proxy routes.
    - Gateway token persisted in SQLite, validated on every proxied request.
    - get_claude_desktop_status surfaces drift signals (stale models,
      missing routes, proxy stopped, base URL mismatch, missing token).
    
    Frontend:
    - Slim ClaudeDesktopProviderForm independent from ProviderForm,
      controlled by a top-level appId guard.
    - ProviderList banner consumes the status query (5s polling) and
      renders actionable diagnostics.
    - ClaudeDesktopRouteToggle in the header to start/stop the local
      gateway without touching takeover state.
    - Three-locale i18n synchronised.
  • feat(providers): add Baidu Qianfan Coding Plan for Claude Code (#2322)
    * feat(providers): add baidu qianfan coding plan presets
    
    * refactor(providers): align qianfan presets with existing format
    
    * chore(providers): narrow qianfan coding plan scope
  • chore(kimi): update Kimi For Coding website URL to /code/docs/
    Sync the preset's websiteUrl from the legacy /coding/docs/ path to
    the current /code/docs/ path across all four app presets (claude,
    hermes, openclaw, opencode).
  • feat(compshare): add Coding Plan preset across claude/codex/hermes/openclaw
    Introduce a dedicated "Compshare Coding Plan" variant pointing to
    https://cp.compshare.cn (with /v1 for OpenAI-compatible apps). Reuses
    the existing ucloud icon and promotion copy, while adding a new
    providerForm.presets.ucloudCoding key in zh/en/ja.
  • feat(deepseek): switch presets to V4 (flash/pro) and add pricing
    DeepSeek released V4 flash/pro; legacy IDs deepseek-chat / deepseek-reasoner
    now alias to deepseek-v4-flash and will be deprecated.
    
    - Update claude/hermes/opencode/openclaw presets to v4-pro / v4-flash,
      context 128K -> 1M; Claude Anthropic-compat endpoint routes OPUS/SONNET
      to v4-pro and HAIKU to v4-flash, plus an explicit modelsUrl override.
    - Seed deepseek-v4-flash ($0.14/$0.28 per 1M) and deepseek-v4-pro
      ($1.68/$3.36 per 1M) into model_pricing; older v3.x / chat / reasoner
      rows kept for historical usage stats (INSERT OR IGNORE).
    - Refresh user-manual (zh/en/ja) pricing table and note that legacy model
      IDs are billed at v4-flash rates.
  • fix(model-fetch): support /models for Anthropic-compat subpath providers
    Providers like DeepSeek, Kimi, Zhipu GLM and MiniMax expose the
    Anthropic-compatible API on a subpath (e.g. /anthropic) while the
    OpenAI-style /models endpoint lives at the API root. The previous
    heuristic blindly appended /v1/models to the Base URL, so every such
    provider returned 404 and the UI mislabeled it as "provider does not
    support fetching models".
    
    Backend now generates a candidate list and tries them in order:
    preset override -> baseURL /v1/models -> stripped-subpath /v1/models ->
    stripped-subpath /models. Non-404/405 responses (auth, network) stop
    immediately so we never retry against hostile status codes. Known
    compat suffixes are kept in a length-descending constant so the
    longest match wins; response bodies are truncated to 512 chars to
    avoid HTML 404 pages bloating the error string.
    
    Preset type gains an optional modelsUrl (DeepSeek points at
    https://api.deepseek.com/models). Frontend threads the override
    through fetchModelsForConfig when the current Base URL still matches
    the preset default. A new fetchModelsEndpointNotFound i18n key
    replaces the misleading "not supported" toast for exhausted-candidate
    and 404/405 cases (zh/en/ja).
  • fix(copilot): resolve Claude model IDs against live /models list
    Copilot upstream returns model_not_supported when the client sends
    dash-form Claude IDs (claude-sonnet-4-6, claude-sonnet-4-6[1m]) while
    /models only accepts dot form (claude-sonnet-4.6, -1m suffix).
    
    - Add copilot_model_map: syntax normalize (dash->dot, [1m]->-1m) plus
      live /models exact match and family-version fallback, reusing the
      existing 5 min auth cache. Returns None when the whole family is
      absent so upstream surfaces an explicit error instead of silently
      switching families.
    - Wire into forwarder Copilot hook; runs before anthropic_to_openai
      conversion.
    - Default Opus slot in the Copilot preset maps to Sonnet 4.6: Pro
      dropped all Opus on 2026-04-20 and Pro+ bills Opus 4.7 at 7.5x.
      Users who want real Opus can switch manually in the UI.
    
    Refs: https://github.com/farion1231/cc-switch/issues/2016
  • feat(tray): show coding-plan usage for Kimi / Zhipu / MiniMax
    dc04165f surfaced tray usage badges for Claude/Codex/Gemini official
    OAuth only. Chinese coding-plan providers already expose 5h + weekly
    windows through coding_plan::get_coding_plan_quota, but two gaps kept
    the tray from rendering them.
    
    - format_script_summary read only data.first(), truncating the tier-
      flattened UsageResult to a single window. Detect plan_name matching
      TIER_FIVE_HOUR / TIER_WEEKLY_LIMIT and emit the "🟢 h12% w80%" layout
      used by format_subscription_summary; worst utilization drives the
      emoji. Copilot / balance / custom scripts keep the legacy single-
      bucket output via fallback.
    
    - usage_script previously required manual activation through
      UsageScriptModal. Auto-inject meta.usage_script on Claude provider
      creation when ANTHROPIC_BASE_URL matches a known coding plan, so the
      tray lights up without the user opening the modal. Does not overwrite
      existing usage_script on update.
    
    Extract the URL route table out of UsageScriptModal into a shared
    codingPlanProviders module so the modal, the creation hook, and the
    Rust coding_plan::detect_provider mirror all agree on one list.
    Add TIER_WEEKLY_LIMIT alongside TIER_FIVE_HOUR and a createUsageScript()
    factory to collapse the duplicated default fields across four call
    sites and drop the remaining stringly-typed tier names.
  • feat(presets): upgrade Kimi K2.5 to K2.6 in direct Moonshot configs
    Bump model id and display name from K2.5 to K2.6 in Hermes, OpenClaw,
    OpenCode, and Claude (direct api.moonshot.cn) presets. Pricing,
    context window, and base URL are unchanged.
    
    Add kimi-k2.6 row to model_pricing seed; no migration needed since
    seed_model_pricing uses INSERT OR IGNORE and runs on every startup
    via ensure_model_pricing_seeded. Old kimi-k2.5 row is kept to
    preserve historical usage stats.
    
    Nvidia aggregator forwards (moonshotai/kimi-k2.5) intentionally keep
    the K2.5 SKU until Nvidia's catalog confirms K2.6.