Skip to content

feat: discover models during custom provider setup - #173300

Merged
steipete merged 10 commits into
mainfrom
fix/model-discovery
Oct 16, 2026
Merged

steipete merged 10 commits into
mainfrom
fix/model-discovery

Conversation

@steipete

@steipete steipete commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Related: #121584, #122042

What Problem This Solves

Custom OpenAI-compatible setup required a manually entered model ID even when the endpoint advertised its models.

User Impact

The wizard offers discovered models and manual entry. Noninteractive setup can omit --custom-model-id to import the advertised list and select its first model; an explicit ID skips discovery. Empty, invalid, unavailable, and unauthorized responses explain how to fall back to a manual ID. Anthropic-compatible setup still requires an explicit ID.

Existing endpoint credentials, including saved environment-variable markers, can authenticate discovery without changing their stored representation. Saved auth: none remains authoritative unless a new key is supplied. Replacement endpoints never borrow old credentials. Reset rejects before HTTP or deletion if it would discard the only discovery credential; supply a key independently or rerun without reset.

Why This Change Was Made

Both setup paths use the existing guarded self-hosted discovery owner, retaining network policy, deadlines, and the response-byte limit. Bulk catalog application now runs once instead of repeatedly copying growing catalogs and allowlists. It preserves authored metadata, model ordering, named-agent ownership, and explicit Azure normalization. No new command, catalog owner, dependency, or schema.

Thanks @alexandre-leng for the reports and setup proposal.

Evidence

Authority-matrix runtime: f49bf32d046e1c1f7c87fbb6dc1ae8219c3c8801. Current head: f68181c46506308d18d6bf145946a129d3907ccc. The subsequent runtime change resolves saved environment-variable markers through the existing model-auth owner. It does not rewrite the stored marker. The earlier authority and reset matrix below remains separately attributed; the marker-specific before/after capture exercises the current head.

Four configurations were originally created through pnpm openclaw on pre-PR main 93e4b56350e492fa30f8bd75b4e47ab1413ecfc1. The run restored verified first-write backups and inactive profile stores; original hashes and profile-store timestamps were checked. All state was isolated. Recording relays A and B answered /v1/models and /v1/chat/completions; captures contain request method/path, auth-header presence, and SHA-256 prefixes only.

Scenario Destination Credential evidence Result
Pre-PR inline → PR setup A /v1/models Authorization SHA-256 a44370c1599f32ca matches PASS; credential representation and original model rows preserved
Pre-PR ref → PR setup A /v1/models Authorization SHA-256 512edf3258be833f matches PASS; credential representation and original model rows preserved
Pre-PR profile → PR setup A /v1/models Authorization SHA-256 2ff2e1ee540f7b02 matches PASS; credential representation and original model rows preserved
Pre-PR profile-local → PR setup A /v1/models Authorization SHA-256 6adf84f2e8be577b matches PASS; credential representation and original model rows preserved
Upgrade model list/completion A /v1/chat/completions Saved inline digest matches PASS; old/new rows load and completion reaches A
Replacement endpoint B /v1/models No Authorization or custom auth headers PASS; A received zero requests
Incompatible profile No request Credential rejected before HTTP PASS; config preserved
Reset preflight to replacement B /v1/models No Authorization or custom auth headers PASS; A received zero requests
Same-provider profile to replacement B /v1/models No Authorization or custom auth headers PASS; A received zero requests
Reset same-provider profile to replacement B /v1/models No Authorization or custom auth headers PASS; A received zero requests
Persisted-policy case HTTP credential evidence Result
setup-inline No Authorization or custom auth headers PASS (32.17s)
setup-ref No Authorization or custom auth headers PASS (29.2s)
reset-inline No Authorization or custom auth headers PASS (21.96s)
reset-ref No Authorization or custom auth headers PASS (25.96s)
replacement-inline Matching replacement digest be7cec3ff246064d; staged inactive PASS (22.82s)
replacement-ref Matching replacement digest be7cec3ff246064d; staged inactive PASS (32.33s)
large-catalog-10000 No Authorization or custom auth headers; 10,000 IDs preserved PASS (17.67s)

Same-endpoint reset that would discard its only credential: rejected before HTTP, zero requests, config byte-for-byte unchanged (34.61s).

The upgrade/destination matrix passed in 202.03s. Allowed setups took 31.54–31.85s; existing/discovered model rows loaded in 18.17s, and an authenticated completion probe reached A in 23.81s. Every B request was anonymous, with no request to A after switching. The incompatible binding rejected before HTTP and left config unchanged.

The persisted-no-auth fixtures overlay that policy on the genuine pre-PR shapes. Inline and unresolved env-reference setup/reset all succeeded anonymously (21.96–32.17s). Independently supplied env keys reached A with matching digests, then followed the existing inactive-credential staging flow; the current no-auth config remained intact. The 10,000-model import preserved all IDs, the old row, and credential representation in 17.67s. Sixteen selected redacted requests cover these cases.

Before the reset fix, a real CLI run authenticated discovery and then deleted its only key (549.12s including startup rebuild). The repaired runtime rejects before any HTTP/reset, preserves the key, and leaves config byte-for-byte unchanged (34.61s).

The final saved-marker capture starts from the same pre-PR configuration with apiKey: "OPENAI_API_KEY", a synthetic value in that variable, and no CUSTOM_API_KEY or credential/model flags. On 7b14274, discovery sent an anonymous request and failed (115.62s including build); the configuration stayed unchanged. On the current head, discovery succeeds in 24.08s and preserves the marker plus the original model row; an authenticated completion probe succeeds in 29.18s. Both requests carry the matching SHA-256 prefix 278e41968ce81021, and no raw credential appears in output.

Saved environment-marker case Destination Credential evidence Result
Before repair A /v1/models No Authorization or custom auth headers Reproduced setup failure; config unchanged (115.62s including build)
Repaired setup A /v1/models Authorization SHA-256 278e41968ce81021 matches PASS; stored marker and original model row preserved (24.08s)
Repaired completion A /v1/chat/completions Same matching digest PASS (29.18s)

Validation

  • All 181 tests across five discovery/setup files passed on the current head (174.01s wall, including compiler preparation and verification). The saved-marker regression failed on the original head (26.45s) and passes after the repair. The original 180-test run also passed (451.38s). Three persisted-policy regressions failed on the previous implementation (122.88s); refined inline/reference cases and the catalog-cost regression also failed before repair (109.80s). The latter observed 4,160 existing-ID reads for 64 old plus 64 new rows, above its 1,024 linear-work allowance. After the line-cap extraction, all 46 tests in its original owning suite passed again (90.80s).
  • Current-head core types passed (323.95s), command-test types passed (344.84s), and scoped type-aware lint passed (307.11s); these include the shared artifact-owner wait. All nine type/lint/ratchet checks finished within 363.78s total. Formatting and diff checks passed. The current-head runtime build passed (287.14s).
  • Assertion-safety, timeout-race, mock-export, config-doc, and plugin-inventory ratchets passed. The test split passes line-cap. Max-lines fails identically on the exact integrated base and current runtime: three pre-existing UI suppressions; their files, baseline, and checker are unchanged. No suppression or baseline expansion was added.
  • Fresh full-branch Codex autoreview of the current head: scoped-clean through P2, zero findings.
  • Earlier real-model controls on 8fcc7cdafcfd: actual local-agent responses through LM Studio google/gemma-4-e4b (147.14s) and Ollama qwen2.5:7b (187.63s). Those are prior-head inference controls; the recorded runtime proof exercises real CLI/config/auth/HTTP boundaries with deterministic responders.

Platform limit: Apple Silicon macOS. Upgrade source is pre-PR main, not a released Azure installation. Operator state, Gateway, LaunchAgents, and shared models were untouched. Endpoints may advertise embedding models; use an explicit ID if the first model is unsuitable for chat.

Production +310/−97 (net +213), tests +1017/−43, docs +27/−1 against integrated main. Growth covers setup selection, existing credential policy/resolution, reset handoff, and batch catalog application; no second catalog owner or public surface was added.

External validation status

Exact-head CI run 38887661367 passed: 47 successful jobs, 26 skipped, zero failures. Both openclaw/ci-gate and openclaw/security-sensitive-review passed.

ClawSweeper reviewed f68181c46506308d18d6bf145946a129d3907ccc and reported no actionable findings. Its remaining hold requests a released-version Azure upgrade capture; that proof is not claimed here. Completed compatibility proof starts from pre-PR main, as documented above.

An earlier head's CI failed an unchanged compaction assertion. Its full file passed 83/83 on the exact integrated base (399.42s), and the failing case passed locally on the previous head (278.05s). The original CI cause remains un-reproduced; unchanged source alone does not prove it inherited. The failure did not recur in this head's successful run. No merge requested.

Extend the existing custom setup flow with guarded OpenAI-compatible model discovery, manual fallback, and prepared reset discovery. Keep explicit model IDs authoritative and retain authored model metadata.

Refs #121584, #122042. Thanks @alexandre-leng for the reports and setup proposal.
Use the canonical plugin metadata snapshot for credential-bearing discovery and make bypass regressions hermetic. Remove two verified stale max-lines baseline entries.
@clawsweeper

clawsweeper Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime cli CLI command changes commands Command implementations size: L labels Oct 15, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 15, 2026
@clawsweeper

clawsweeper Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR adds model discovery and selection to custom-provider setup, including bulk catalog import during noninteractive onboarding.

Example: An OpenAI-compatible endpoint at http://127.0.0.1:8000/v1 advertises local-small and local-large.

  • Before: Setup requires the operator to enter a model ID manually.
  • After: Interactive setup offers both models; noninteractive setup can import both and select local-small by omitting --custom-model-id.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful implementation with resolved prior findings and substantial production-path evidence; released-state compatibility remains unproven.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Partial
User problem: Custom-provider users must look up model IDs and manually populate catalogs even when their endpoint advertises available models.
Reason: Maintainer authorship establishes direction, and the focused addition addresses the concrete setup friction reported by alexandre-leng without introducing another wizard or catalog owner; Related wording correctly preserves the broader requests.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep this PR open: it delivers a useful, maintainer-directed setup feature, resolves the previous findings, and has no newly identified code defect.

Priority: P2
Reviewed head: f68181c46506308d18d6bf145946a129d3907ccc

Before merge

  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

None.

Tests

  • Missing end-to-end proof: Supply a redacted upgrade capture from v2026.10.4 through custom-provider discovery, including an authored Azure configuration, showing credentials, model metadata, settings, and subsequent inference remain usable.
Agent review details

How this fits together

Onboarding takes endpoint, credential, and model choices, uses guarded provider discovery, and passes the result to the existing provider-config and agent-model owners.

flowchart TD
  A[Interactive wizard] --> C[Custom provider setup]
  B[Noninteractive CLI] --> C
  C --> D[Credential resolution]
  D --> E[Guarded model discovery]
  E --> F[Provider catalog configuration]
  F --> G[Agent model selection]
Loading

Technical review

Best possible solution:

Keep discovery within the existing setup and provider owners while preserving explicit choices, credential representation, and authored model metadata.

Do we have a high-confidence way to reproduce the issue?

This is a capability addition; source inspection confirms the manual-entry requirement on main, and the supplied real CLI evidence exercises discovery after the change.

Is this the best way to solve the issue?

Reusing guarded discovery and the existing configuration owner is appropriate; explicit IDs bypass discovery, and bulk imports avoid the previously reported quadratic copying.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 527f9d1a1306.

Provenance checked

  • Interactive custom-provider setup changes intended behavior with a stated reason (c0befde: Introduce dedicated custom/local endpoint setup with connectivity verification; the actual merged implementation uses a manual model-ID prompt despite discovery language in its original description.)
  • Noninteractive custom-provider flags and configuration changes intended behavior with a stated reason (029b77c: Add automated custom-provider setup and share configuration construction with the interactive flow.)
  • Azure model construction and authored metadata keeps the original intent (a944c12: Consolidate generated model definitions while retaining Azure defaults and existing-model preservation rules.)
  • Explicit anonymous authentication keeps the original intent (574479a: Make no-auth authoritative before credential preparation and reject unsupported adapters before reset or persistence.)
  • Reset preflight keeps the original intent (d4ed089: Reject invalid setup inputs before moving existing state to Trash.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Pinned review scope and repository policy: Reviewed the introduced base-to-head diff, root AGENTS.md, and docs/AGENTS.md; no additional ancestor instructions govern the changed source paths, and .agents/maintainer-notes is absent. (AGENTS.md:1, f68181c46506)
  • Current-main capability gap: Fetched main still requires a custom model ID and presents a manual model-ID prompt; the proposed discovery path remains distinct work. (src/commands/onboard-custom-config.ts:417, 527f9d1a1306)
  • Previous environment-marker finding resolved: The head adds resolveUsableCustomProviderApiKey after profile-binding resolution, preserving profile precedence while resolving saved environment markers before discovery. (src/commands/onboard-custom-config.ts:509, f68181c46506)
  • Existing guarded transport retained: Discovery reuses the self-hosted provider owner with SSRF policy, a five-second request timeout, bounded response parsing, and runtime-context probing disabled. (src/plugins/provider-self-hosted-discovery.ts:104, f68181c46506)
  • Reset and credential authority: Reset rejects before discovery or deletion when its only credential would disappear; endpoint collisions select a separate provider identity, and persisted no-auth policy bypasses credential resolution. (src/commands/onboard.ts:326, f68181c46506)
  • Supplied production-path evidence: The complete live PR body records real CLI requests with matching synthetic credential hashes, anonymous replacement destinations, incompatible-profile rejection, reset preservation, and current-head marker discovery plus authenticated completion. (f68181c46506)

PR surface

Source +213, Tests +974, Docs +26. Total +1213 across 18 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 7 310 97 +213
Tests 7 1017 43 +974
Docs 4 27 1 +26
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 18 1354 141 +1213

Review metrics

Metric Value Why it matters
Production versus test changes Production +310/−97; tests +1017/−43 Production growth implements selection, credential resolution, reset preparation, and linear catalog application; tests cover distinct credential, persistence, fallback, and reset contracts.

Labels

Label changes:

  • remove merge-risk: 🚨 auth-provider: Current PR review selected no merge-risk labels.
  • remove status: ⏳ waiting on author: Current PR status no longer selects a status label.

Label justifications:

  • P2: Custom-provider discovery removes setup friction while explicit model IDs and manual entry remain available.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (7 earlier review cycles)
  • reviewed 2026-10-15T17:09:33.447Z sha 8fcc7cd :: blocked before merge. :: [P1] Preserve authored Azure metadata during bulk discovery imports
  • reviewed 2026-10-15T18:16:44.452Z sha e10ffce :: blocked before merge. :: [P2] Reuse the configured provider credential for discovery
  • reviewed 2026-10-16T04:29:57.363Z sha 889cd9e :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-16T08:38:44.754Z sha a669605 :: blocked before merge. :: [P1] Reject reset when the discovery credential cannot survive
  • reviewed 2026-10-16T09:17:49.359Z sha e6c10cf :: blocked before merge. :: [P1] Reject reset when the discovery credential cannot survive | [P2] Resolve discovery profiles from the existing agent owner
  • reviewed 2026-10-16T09:37:59.345Z sha 8bedca3 :: blocked before merge. :: [P1] Honor persisted no-auth before resolving discovery credentials | [P2] Construct discovered catalogs without quadratic copying | [P2] Describe the reset credential rejection accurately
  • reviewed 2026-10-16T10:16:59.571Z sha 7b14274 :: blocked before merge. :: [P2] Resolve saved environment markers before model discovery

Reviewed October 16, 2026, 6:36 AM ET / 10:36 UTC (Revision 8).

@steipete
steipete marked this pull request as ready for review October 15, 2026 17:22
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T10:33:51.666663Z f68181c New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@steipete
steipete marked this pull request as draft October 15, 2026 17:38
@steipete
steipete marked this pull request as ready for review October 15, 2026 18:02
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e10ffce4ca

ℹ️ 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 result = applyCustomApiConfig({
const modelIds = await resolveNonInteractiveCustomApiModelIds({
...customAuth,
apiKey: resolvedCustomApiKey?.key,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reuse the configured key for model discovery

When non-interactive onboarding is rerun for an existing custom provider whose credential is stored only in models.providers[id].apiKey, omitting both --custom-api-key and --custom-model-id sends discovery without authentication because resolveNonInteractiveApiKey checks flags, environment variables, and profiles but not the provider configuration. Authenticated endpoints therefore return no models and onboarding rejects the configuration, even though applyCustomApiConfig otherwise preserves that existing key. Resolve the configured credential for the discovery request while retaining its existing storage representation.

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Oct 15, 2026
@steipete
steipete marked this pull request as draft October 16, 2026 02:22
@steipete

Copy link
Copy Markdown
Contributor Author

Fixed the configured-credential P2 in 889cd9e. Both noninteractive setup and reset preflight now reuse a matching provider's inline key or SecretRef through the existing resolution owners, without rewriting or logging the resolved credential. Configured profile IDs retain the existing profile-binding checks, and different endpoints cannot inherit the old key.

The five requested credential regressions fail before the repair. The follow-up also repairs the guided activation fixture's handling of the new bodyless catalog GET. All 149 focused discovery/setup unit tests pass, and the final full-branch independent review is clean through P2. Validation results and remaining platform/proof limits are recorded in the updated PR body. The existing stable-release Azure upgrade limitation remains documented.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Oct 16, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7b14274f72

ℹ️ 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".

Comment on lines +505 to +509
if (binding.kind === "profile-resolved") {
configuredKey = binding.auth.apiKey;
} else if (binding.kind === "profile-incompatible" || binding.kind === "profile-unresolved") {
throw credentialError();
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve configured environment markers before discovery

When an existing custom provider stores a legacy environment marker such as OPENAI_API_KEY in apiKey and the model ID is omitted, resolveProviderEntryApiKeyBinding classifies the marker as none, so this branch leaves the marker string in configuredKey; materializeSecretInput then treats it as a literal and discovery sends Bearer OPENAI_API_KEY instead of the environment value. Normal inference explicitly resolves these backward-compatible markers, so an otherwise working provider now fails discovery and onboarding. Fresh evidence is the newly added binding path, which handles profiles and SecretRefs but not its none result for environment markers; resolve those through the existing model-auth owner before issuing the request.

AGENTS.md reference: AGENTS.md:L57-L57

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. clawsweeper:intake:feature Preliminary submission classification; full source review pending. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 16, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Fixed the saved environment-marker finding in f68181c by reusing the existing runtime credential resolver, preserving profile precedence and the stored marker.

The new regression fails before the fix and passes now. Real pnpm openclaw proof with a synthetic OPENAI_API_KEY and no key/model flags recorded anonymous discovery and failure before; after, discovery succeeds in 24.08s and authenticated completion succeeds in 29.18s. Both carry the same expected credential hash; the marker and original model row survive unchanged. The PR Evidence section includes the redacted request table and the earlier A/B destination controls.

All 181 discovery/setup tests pass; types, lint, applicable ratchets, runtime build, and fresh full-branch Codex autoreview pass. Pre-PR main upgrade shapes are covered; a released-version Azure upgrade remains an explicitly documented proof limitation.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete
steipete merged commit 4446452 into main Oct 16, 2026
136 of 139 checks passed
@steipete
steipete deleted the fix/model-discovery branch October 16, 2026 11:10
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Oct 16, 2026
…174191)

Fill the missing Simplified and Traditional Chinese catalog entries for
manual model-ID entry and unavailable endpoint discovery. The two keys
were introduced in #173300 without translations, causing the wizard to
fall back to English and breaking the existing locale parity check.

The catalogs are maintained in-tree. Preserve runtime fallback and every
parity assertion. No migration or update behavior changes.

Proof: pnpm test src/wizard/i18n/index.test.ts --maxWorkers=1 reproduced
7 pass / 1 fail before and passes 8/8 after (3.50s Vitest, 5.56s runner).
Core and commands/wizard test types, scoped oxlint, boundary lint,
formatting, and P2 autoreview pass.
steipete added a commit that referenced this pull request Oct 17, 2026
…74824)

* fix(litellm): preserve mixed-case proxy URLs during reauthentication

Resolve the authored provider row before choosing onboarding defaults, so
unattended reauthentication keeps its proxy and catalog instead of staging
localhost:4000. Reuse the same existing resolver for prompt and discovery reads.

Related: #173300, #173164

* fix(setup): retain provider alias folding during activation

* fix(setup): prefer canonical provider snapshots during activation

* fix(litellm): keep discovery URL and path selection aligned
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
* feat: discover models during custom provider setup

Extend the existing custom setup flow with guarded OpenAI-compatible model discovery, manual fallback, and prepared reset discovery. Keep explicit model IDs authoritative and retain authored model metadata.

Refs openclaw#121584, openclaw#122042. Thanks @alexandre-leng for the reports and setup proposal.

* test: complete custom discovery fixtures

Use the canonical plugin metadata snapshot for credential-bearing discovery and make bypass regressions hermetic. Remove two verified stale max-lines baseline entries.

* fix(onboarding): preserve Azure metadata during discovery

* fix: reuse configured credentials during custom model discovery

* fix: preserve custom provider credential authority during setup

* fix: reject reset that discards discovery credentials

* fix: preserve anonymous discovery policy and batch model imports

* test: keep discovery catalog regression within suite limits

* fix: resolve saved environment markers for model discovery
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
…penclaw#174191)

Fill the missing Simplified and Traditional Chinese catalog entries for
manual model-ID entry and unavailable endpoint discovery. The two keys
were introduced in openclaw#173300 without translations, causing the wizard to
fall back to English and breaking the existing locale parity check.

The catalogs are maintained in-tree. Preserve runtime fallback and every
parity assertion. No migration or update behavior changes.

Proof: pnpm test src/wizard/i18n/index.test.ts --maxWorkers=1 reproduced
7 pass / 1 fail before and passes 8/8 after (3.50s Vitest, 5.56s runner).
Core and commands/wizard test types, scoped oxlint, boundary lint,
formatting, and P2 autoreview pass.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
…enclaw#174824)

* fix(litellm): preserve mixed-case proxy URLs during reauthentication

Resolve the authored provider row before choosing onboarding defaults, so
unattended reauthentication keeps its proxy and catalog instead of staging
localhost:4000. Reuse the same existing resolver for prompt and discovery reads.

Related: openclaw#173300, openclaw#173164

* fix(setup): retain provider alias folding during activation

* fix(setup): prefer canonical provider snapshots during activation

* fix(litellm): keep discovery URL and path selection aligned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:intake:feature Preliminary submission classification; full source review pending. cli CLI command changes commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant