Repository navigation
fix: DashScope and Moonshot endpoints misclassified as custom when the provider plugin is not installed - #100125
Conversation
|
Codex review: needs changes before merge. Reviewed July 5, 2026, 5:09 AM ET / 09:09 UTC. Summary PR surface: Source +55, Tests +217, Docs +6, Other +82. Total +360 across 7 files. Reproducibility: yes. from source: current main resolves endpoint classes only from discovered plugin manifests, while built source/dist excludes the affected external provider plugins, so generic DashScope/Moonshot-style URLs fall back to custom when the plugin is absent. The PR body also reports a focused build-plus-test reproduction and negative-control revert. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Land a version that uses catalog endpoint metadata only when the corresponding official provider plugin is absent from discovered manifest metadata, with tests for absent-plugin fallback, installed-manifest precedence, and installed-plugin removal/narrowing, then rerun focused provider/media tests and the failing CI lane. Do we have a high-confidence way to reproduce the issue? Yes from source: current main resolves endpoint classes only from discovered plugin manifests, while built source/dist excludes the affected external provider plugins, so generic DashScope/Moonshot-style URLs fall back to custom when the plugin is absent. The PR body also reports a focused build-plus-test reproduction and negative-control revert. Is this the best way to solve the issue? No as submitted. The central provider-attribution boundary is the right place, but the catalog fallback must be suppressed for installed provider plugin ids so upgraded plugins remain authoritative for endpoint policy. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b6f4cf5ac432. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +55, Tests +217, Docs +6, Other +82. Total +360 across 7 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (5 earlier review cycles)
|
Dependency graph guard clearedThis PR no longer has blocked dependency graph changes. A future dependency graph change requires a fresh
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d02c5936ea
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const queuedAbort = abortAuthorizedQueuedTurnsForSession({ | ||
| context: params.context, | ||
| sessionKeys, | ||
| sessionId: params.sessionId, | ||
| agentId: params.agentId, |
There was a problem hiding this comment.
Preserve queued BTW turns during session abort
When TUI sends a session-scoped stop it passes preserveSideRuns, and the active/pending run paths below honor that by skipping turnKind: "btw"; queued chat turns are aborted here before those filters run, and the queued-turn entry never stores turnKind. If a user sends /btw while the main turn is busy and the prompt is waiting in followup/collect, pressing Esc for the main turn will cancel that side question too, contradicting the new preserve-side-runs behavior.
Useful? React with 👍 / 👎.
d02c593 to
74385bc
Compare
cfedbf9 to
0d1a6fd
Compare
…t installed plugins DashScope/Moonshot/Z.AI/DeepSeek/Groq/Cerebras/Chutes endpoint classes lived only in their provider plugin manifests. Those plugins are excluded from dist packaging, so dist gateways (and built source checkouts, where bundled discovery prefers dist/extensions) classified their base URLs as custom unless the plugin was installed: DashScope image describe prompts left user content, streaming-usage and developer-role compat defaults regressed, and src/media-understanding/image.test.ts plus the model-compat DashScope/Qwen cases failed deterministically after pnpm build, wedging local scripts/pr landing lanes. The official external provider catalog now mirrors each externalized plugin's manifest providerEndpoints, and provider attribution appends catalog metadata after installed/bundled manifests (first match wins, installed manifests stay authoritative). Classification reads the repo-bundled catalog only; hosted feeds never influence it. Endpoint classes core does not recognize (deepinfra-native, gmi-native, qwen-portal-native) stay inert via the existing allowlist filter, matching installed-manifest behavior. A contract test enforces the catalog-manifest mirror; a dist-simulation test covers classification without any plugin manifests. Repro fixed: pnpm build && pnpm test src/media-understanding/image.test.ts src/agents/model-compat.test.ts
fe69ca6 to
0c18009
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0c18009489
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for (const manifest of listOfficialExternalProviderEndpointManifests()) { | ||
| entries.push(...readManifestProviderEndpoints(manifest)); |
There was a problem hiding this comment.
Skip catalog endpoints for installed providers
When an external provider plugin is installed but has newer or narrower providerEndpoints, this loop still appends the bundled catalog entries for the same provider afterward. First-match precedence only helps for URLs the installed manifest also matches; any URL the installed plugin intentionally removed or changed can still be classified by stale core-bundled catalog metadata, so an upgraded qwen/moonshot/etc. plugin cannot fully override its endpoint policy until the core catalog is updated too.
Useful? React with 👍 / 👎.
|
Land-ready verification for head Exact-head CI: workflow run 28735487409 — scripts/pr flow: Local proof (from the PR work):
Known proof gaps: none for the changed surface; the QA smoke flake is unrelated (channel-native /stop targeting, mock-openai profile). |
…e provider plugin is not installed (openclaw#100125) Externalized provider plugins (qwen, moonshot, zai, deepseek, groq, cerebras, chutes) are excluded from dist packaging, so their manifest-declared endpoint classes were invisible to installed gateways and built source checkouts: DashScope/Moonshot-class base URLs classified as custom, breaking image prompt placement, streaming-usage and developer-role compat defaults, and deterministically failing image.test.ts / model-compat DashScope cases after pnpm build. The official external provider catalog now mirrors each plugin's providerEndpoints and provider attribution appends catalog metadata after installed/bundled manifests (first match wins; repo-bundled catalog only, hosted feeds never influence classification). Includes a catalog-manifest mirror contract test and a dist-simulation regression test.
What Problem This Solves
Fixes an issue where DashScope/Qwen, Moonshot, Z.AI, DeepSeek, Groq, Cerebras, and Chutes base URLs were misclassified as
customendpoints whenever the owning provider plugin was not installed. These provider plugins are externalized (excluded from dist packaging), so installed gateways had no source for their endpoint classes: DashScope image-describe prompts were moved out of user content (breaking vision requests), and streaming-usage / developer-role compat defaults regressed for anyone pointing a generic provider key at these endpoints.The same root cause made
src/media-understanding/image.test.ts("places DashScope image prompts in user content before images") and the DashScope/Qwen cases insrc/agents/model-compat.test.tsfail deterministically in any source checkout wherepnpm buildhad run (bundled discovery prefersdist/extensionsonce it exists, and the built tree does not contain externalized plugins). This silently wedged localscripts/prlanding lanes, which run build → check → test in one worktree; two lanes looped on it for hours on 2026-07-04.Why This Change Was Made
Endpoint classification is endpoint-keyed request policy — the code contract in
resolveProviderRequestCapabilitiesexplicitly says users can point a generic provider key at Moonshot or DashScope and still need native request policy. That contract broke when these plugins were externalized, because classification metadata only lived in plugin manifests. The official external provider catalog (scripts/lib/official-external-provider-catalog.json) is the core-shipped registry for exactly these plugins, so it now mirrors each plugin's manifestproviderEndpoints, andprovider-attributionappends catalog metadata after installed/bundled manifests (first match wins, so installed manifests stay authoritative).Boundaries: classification reads the repo-bundled catalog JSON only — hosted marketplace feeds can never influence endpoint classification (it is SSRF/attribution policy surface). Endpoint classes core does not recognize (
deepinfra-native,gmi-native,qwen-portal-native) are mirrored faithfully but stay inert via the existing allowlist filter, identical to installed-manifest behavior; widening the core class union is a separate product decision.providerRequest(provider-id-keyed metadata) is intentionally not mirrored: running a canonical provider id without its plugin is not a supported configuration.Alternatives rejected: preferring the source
extensions/tree in built checkouts would fight deliberate, test-pinned bundled-dir behavior and leave shipped dist gateways broken; mocking the failing tests would hide a real shipped regression.User Impact
Installed (dist) gateways classify DashScope, Moonshot, Z.AI, DeepSeek, Groq, Cerebras, and Chutes endpoints natively again without requiring the provider plugin: DashScope image description places prompts in user content, and streaming-usage / developer-role compat defaults apply by URL as documented. Local
pnpm build && pnpm testis deterministic again in source checkouts, unwedgingscripts/prlanding lanes. Installing a provider plugin still overrides catalog metadata.Evidence
pnpm build && pnpm test src/media-understanding/image.test.ts src/agents/model-compat.test.ts— previously 1 deterministic failure in image.test.ts plus DashScope/Qwen model-compat failures with a dist tree present; now green (29/29 image incl. the DashScope case, 104/104 agents shard, 54/54 plugins shard), and the same set is green pre-build.dist/extensionsin a built checkout contains noqwen/moonshot, confirming the failing state under test.src/agents/provider-attribution.catalog-endpoints.test.tssimulates a dist tree (no ambient manifests) and pins classification, manifest-over-catalog precedence, and unknown-class inertness;src/plugins/official-external-provider-endpoints.test.tsenforces the catalog↔manifest mirror for every dist-excluded plugin that declaresproviderEndpoints(parses the package.json dist excludes), which would have caught the original externalization regression.tsgocore + core-test lanes green; oxlint clean; Codex structured review (gpt-5.5) clean after addressing one finding about the intentionally-inert mirrored classes (now documented in code and pinned by tests).