Repository navigation
Conversation
Contributor
Additional Comments (1)
Need to add handling similar to lines 622-638. Prompt To Fix With AIThis is a comment left during a code review.
Path: src/commands/onboard-custom.ts
Line: 674-688
Comment:
Missing handling for `selectType` choice. When verification fails after an explicit compatibility selection (not "unknown"), selecting `selectType` at line 674 will cause an infinite loop because:
1. None of the if statements (675, 683, 686) handle `selectType`
2. If `compatibilityChoice !== "unknown"`, `compatibility` stays set
3. Loop continues with same values → verifies again → fails → prompts again → infinite loop
Need to add handling similar to lines 622-638.
How can I resolve this? If you propose a fix, please make it concise. |
… detection fails When `openclaw onboard` with a custom provider fails to auto-detect the endpoint type, the wizard now offers "Select endpoint type manually" as the first retry option. This unblocks users with OpenAI-compatible proxies (Bedrock Access Gateway, LiteLLM, vLLM, corporate gateways) that fail auto-detection. Changes: - Add `selectType` to CustomApiRetryChoice and retry prompt - Extract `promptManualEndpointType` helper (OpenAI/Anthropic selector) - Handle `selectType` in detection failure path (break, escape hatch) - Handle `selectType` in verification failure path (continue, re-verify) - Add e2e tests for both paths
wjonaskr
force-pushed
the
fix/custom-provider-manual-type-selection
branch
from
February 22, 2026 02:12
c6fb251 to
6e550e5
Compare
Author
|
Superseded by v2 PR rebased on latest main. The original had a missing selectType handler in the verification failure path (caught by Greptile). The new PR fixes both paths and adds tests for each. |
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
openclaw onboardwith "Custom Provider" fails to auto-detect the endpoint type (OpenAI/Anthropic), the wizard only offers retrying URL/model — no way to manually specify the type. The user gets stuck in a loop and ends up with nomodels.providersentry in config.openclaw.jsonwith an undocumented schema.models.providersconfig entry.applyCustomApiConfigare untouched.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
When endpoint auto-detection fails during
openclaw onboardwith a custom provider, the retry prompt now shows a new first option: "Select endpoint type manually". Choosing it presents an OpenAI/Anthropic selector and proceeds without re-probing, writing a workingmodels.providersconfig entry.Existing retry options (Change base URL / Change model / Change both) remain unchanged.
Security Impact (required)
Repro + Verification
Environment
Steps
openclaw onboard, choose "Custom Provider"Expected
models.providersentry to configActual (before fix)
Evidence
New test:
allows manual type selection when detection fails— verifies the full flow from detection failure through manual selection to correct config output.All 13 e2e tests pass:
pnpm vitest run src/commands/onboard-custom.e2e.test.ts --config vitest.e2e.config.tsHuman Verification (required)
Compatibility / Migration
Failure Recovery (if this breaks)
src/commands/onboard-custom.tsRisks and Mitigations
Greptile Summary
Added manual endpoint type selection as an escape hatch when auto-detection fails during custom provider onboarding. This solves the issue where users with OpenAI-compatible proxies that fail detection would get stuck in a retry loop.
Key changes:
"selectType"option to retry prompt when detection failsCritical issue found:
selectTypehandling at line 674 can cause infinite loop when verification fails after explicit compatibility choice (not during detection)Confidence Score: 2/5
selectTypeis chosen during verification failure makes this unsafe to mergeselectTypechosen after verification failure with explicit compatibility choice. The missing case handling is a blocker.src/commands/onboard-custom.tsline 674 - requires additional case handling forselectTypeLast reviewed commit: c6fb251
(2/5) Greptile learns from your feedback when you react with thumbs up/down!