Commit Graph
104 Commits
Author SHA1 Message Date
musi 86a383f647 Merge branch 'main' into dev/compact
# Conflicts:
#	packages/core/src/config/config.ts
#	packages/core/src/contracts/app.ts
#	packages/core/src/gateway/service.ts
#	packages/core/src/profiles/service.ts
#	packages/core/test/unit/agents/context-archive.test.mjs
#	packages/core/test/unit/gateway/codex-patch-bridge.test.mjs
#	packages/ui/src/pages/home/components/profiles.tsx
#	packages/ui/src/pages/home/shared/profiles.ts
#	tests/main/profile-service.test.mjs
#	tests/main/router-builtins.test.mjs
2026-07-23 09:24:28 +08:00
musi 1eea476484 Support context archive tool continuation for Anthropic Messages 2026-07-23 09:02:31 +08:00
musi e239ad8fc9 Refactor routing configuration and provider integrations 2026-07-23 07:28:07 +08:00
musistudio e11bb8bb40 Merge branch 'main' into dev/3.1 2026-07-21 20:11:38 +08:00
musi 8154f3ef12 Merge pull request #1548 from camjac251/fix/provider-plugin-runtime-identity
fix(gateway): align provider plugin runtime identity
2026-07-21 20:08:57 +08:00
musistudio 5dbaafa752 Add manual protocol detection mode for providers 2026-07-21 19:32:24 +08:00
musi f1bf639c54 Refactor routing architecture and streamline provider handling 2026-07-21 12:37:11 +08:00
camjac251 933cd9ac34 fix(profiles): tolerate transient gateway resets
Profile launches could fail with HTTP 0 when a healthy local gateway
reset one loopback probe. Prefer the stable health identity, retry
transport failures, and retain the root endpoint fallback.
2026-07-20 15:26:34 -04:00
camjac251 16a53bb3a9 fix(gateway): preserve local oauth provider base url
Runtime identity normalization previously ran before local OAuth provider
detection, so display-name matching could no longer select the managed
backend endpoint. Defer identity normalization until after detection and
cover the ordering with a regression test.
2026-07-20 13:10:40 -04:00
camjac251 24e52a64f3 fix(gateway): align provider plugin runtime identity
Provider compilation replaces display and capability aliases with stable
runtime identifiers, but plugin targets and fallback headers could retain
the precompiled names. Normalize both paths so routing and authentication
refer to the provider identity that the gateway actually registers.
2026-07-20 13:09:41 -04:00
musi 5d9785ddc3 Preserve explicit models when applying built-in route rewrites 2026-07-20 22:18:28 +08:00
musi 88c07b605a Merge branch 'main' into dev/3.1
# Conflicts:
#	package-lock.json
#	package.json
#	packages/cli/package.json
#	packages/core/package.json
#	packages/core/src/contracts/ipc-channels.ts
#	packages/core/src/gateway/claude-code-router-plugin.ts
#	packages/ui/test/component/layout.test.tsx
2026-07-20 22:09:34 +08:00
musistudio 6c1a90889b Refactor router implementation and configuration 2026-07-20 20:21:18 +08:00
musistudio ea35ed2eaa Add model summaries to request logs 2026-07-20 15:57:13 +08:00
musistudio ecdf2fec0f Support xAI video generation and isolate Codex authentication 2026-07-20 15:38:13 +08:00
musistudio 225b3c23df Improve Codex authentication and app-server launch handling 2026-07-20 14:36:26 +08:00
musistudio 42cc9dbd74 Add NVIDIA NIM provider preset and preserve Claude model selection 2026-07-20 11:08:04 +08:00
musistudio 3f8d450366 Refactor routing architecture and update related modules 2026-07-20 10:10:57 +08:00
H-TTTTT ba3b34e189 fix(opencode): stop forcing Bearer public on public local-agent imports
Public OpenCode imports wrote strict providerPlugins auth with
authorization: Bearer public, which overrode a later real Providers
api_key edit and caused upstream 401s. Put the public token on the
provider api key instead and skip the plugin override.

Fixes #1562
2026-07-20 09:32:17 +08:00
musistudio 5021cc35c0 Enable apply_patch bridging for all non-GPT Codex models 2026-07-20 07:13:53 +08:00
musi d21950bdbd Merge pull request #1561 from jesieleo/fix/claude-subagent-model-routing
fix(gateway):网关对子代理模型配置的处理,并规范化 Responses API 请求(@the-next-ai/ai-gateway 升级到 1.0.10)
2026-07-19 22:05:35 +08:00
musistudio 9fb8a89831 Update routing workflows and supporting configuration 2026-07-19 20:07:40 +08:00
jesieleo 107863919c fix(theme): synchronize dark mode across app and tray 2026-07-19 13:16:29 +08:00
jesieleo e298524965 fix: route Claude subagents with latest gateway requests 2026-07-18 17:15:06 +08:00
musistudio f18759aa8f Add ultra effort and refine model reasoning profiles 2026-07-16 11:23:24 +08:00
musi 5b8f64160e Refactor router internals and update related integrations 2026-07-16 09:29:48 +08:00
musi 9b3339e4e4 Merge branch 'main' into dev/3.1
# Conflicts:
#	packages/core/src/gateway/request/pipeline.ts
#	packages/core/src/observability/request-log-store.ts
#	packages/core/test/integration/observability/request-log-store.test.mjs
#	packages/core/test/unit/agents/gateway-upstream-error-log.test.mjs
#	packages/core/test/unit/agents/provider-model-metadata.test.mjs
2026-07-15 22:08:49 +08:00
musi f021884c1d Merge pull request #1543 from camjac251/fix/subagent-route-handshake
fix(gateway): align subagent route identity
2026-07-15 22:00:53 +08:00
musi ded548da7e Merge pull request #1542 from camjac251/fix/provider-model-context-metadata
fix(gateway): preserve provider context metadata
2026-07-15 21:56:46 +08:00
musistudio 555b31477d Refactor router internals and update related tests 2026-07-15 20:24:04 +08:00
musistudio b1fb8e3331 Refactor router pipeline and update related components 2026-07-15 20:12:32 +08:00
jesieleo 6b4b22aa4b fix: hide JSON credential values in diagnostics 2026-07-15 16:30:55 +08:00
jesieleo e33c856891 fix: hide credentials without obscuring diagnostics 2026-07-15 15:41:00 +08:00
musistudio adadb1679f Cache parsed request bodies and simplify routing traces 2026-07-15 15:31:38 +08:00
musi 30d1f35926 Refactor request routing and provider coordination 2026-07-15 13:32:14 +08:00
jesieleo 7acffa6c5d fix: add privacy-safe upstream failure diagnostics 2026-07-15 09:11:17 +08:00
camjac251 deff4859b5 fix(gateway): align subagent route identity
Hidden route tags select the provider only after child startup, while
clients that support exact model strings need the gateway-visible ID up
front. Publish the client-to-target mapping and accept either identity
through existing discovery resolution.
2026-07-14 19:19:49 -04:00
camjac251 5a3eda0912 fix(gateway): preserve provider context metadata
Provider imports exposed live context limits, but CCR discarded them and
fell back to stale static entries. Preserve physical and effective limits
so generated catalogs and model discovery advertise the provider-specific
usable window.
2026-07-14 19:15:39 -04:00
jesieleo e4d4a08d5d fix: preserve stream outcomes and refine interface layout 2026-07-14 23:07:15 +08:00
musi f6dd3f5b4e Merge branch 'main' into dev/3.1 2026-07-14 22:23:40 +08:00
musistudio 9e56580334 feat: enhance app bot relay 2026-07-14 20:58:08 +08:00
musistudio 2bf349fe03 Add OpenCode bot worker support 2026-07-14 17:30:37 +08:00
musistudio 84855c4dd4 Add OpenCode profile support 2026-07-14 16:49:08 +08:00
musistudio 9094081b7c Exclude ZCode from automatic profile sync 2026-07-14 15:12:19 +08:00
musistudio 7b0e203693 Refine Claude app model discovery and fallback routing 2026-07-14 14:46:54 +08:00
musistudio 1308eb4510 Stream request log analysis to bound memory use 2026-07-14 14:28:35 +08:00
musistudio e3334ae9ae Improve router handling and related integrations 2026-07-14 13:59:10 +08:00
810senpai114514andClaude Sonnet 5 b8a56a1efa fix: strip Provider/ prefix from model name before sending to ai-gateway
Bug evidence from request_logs.sqlite:

  request body:    {"model":"NebulaCoder/nebulacoder-cot-v8.0", ...}
  response body:   {"error":{"message":"All target providers failed.",
                    "attempts":[
                      {"provider":"openai","provider_name":"provider-nebulacoder-ee070b8656",
                       "stage":"model_resolution",
                       "message":"Model "NebulaCoder/nebulacoder-cot-v8.0" is not configured
                                  for target provider openai.
                                  Allowed models: nebulacoder-v8.0, nebulacoder-cot-v8.0."}
                    ]}}

Root cause: prepareUpstreamCredentialAttempt has a !target branch that uses:
  bodyHasConfiguredProviderModelSelector(input.attempt.body, input.config)
    ? input.attempt.body          ← original body with "NebulaCoder/" prefix
    : normalizedBody?.body ...    ← correctly stripped

When the body parses successfully, it prefers the original body with the
Provider/ prefix. This prefixed model name reaches ai-gateway which only
knows bare model names, causing a 400.

Fix: always use normalizedBody.body (which strips the Provider/ prefix)
when available. Remove the now-unused bodyHasConfiguredProviderModelSelector.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 13:33:57 +08:00
musi 21ab38dd47 Add Unity2.Ai provider preset and docs 2026-07-13 21:57:18 +08:00
musistudio f9525f469d Add configured web search providers and upstream proxy preload 2026-07-13 20:27:52 +08:00