fix: make custom providers usable end-to-end in the Web UI - #312
Open
xieqian0816 wants to merge 1 commit into
Open
fix: make custom providers usable end-to-end in the Web UI#312xieqian0816 wants to merge 1 commit into
xieqian0816 wants to merge 1 commit into
Conversation
This was referenced Aug 10, 2026
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
This makes an admin-registered custom model provider usable across the complete production Web flow: save it, pass readiness checks, expose its model in the picker, and run Web turns without requiring a second, explicit allowlist configuration.
Closes #236
Closes #282
This also fixes the custom-provider instance of the readiness symptom described in #290. It does not close #290's broader Claude/Codex subscription-harness case, and it intentionally does not address the separate boot-time
PI_MODELhydration race in #269.Root cause and fix
src/index.tsdid not passcustomProvidersorrefreshCustomProvidersintocreateServernameandprovider, so arbitrary custom models could not be materializedThe implementation stays generic for both supported custom-provider protocols (
openai-completionsandanthropic-messages); it does not special-case DeepSeek.Security and compatibility
api,contextWindow, andmaxTokens; the provider base URL and key are not sent to the browser.Automated verification
test/opencode-harness.test.tspassed immediately in isolation: 10/10. No OpenCode code was changed.npm run format:checknpm run typechecknpm run lintnpm run lint:oxnpm run typecheck:contractLive production-style verification
I reloaded this branch with the repository's dev supervisor and tested through Chrome against a saved DeepSeek OpenAI-compatible provider.
/returned the Web app instead of redirecting to onboarding.Ready, showeddeepseek-v4-flash · custom provider key, and listed the stored key only asset (write-only).DeepSeek V4 FlashunderPiwithout an explicit Web model allowlist.DS_PR_TEXT_OK_20260810.executewithpwd; Admin recorded exit0, the next DeepSeek request contained tool result/root/workspace, and the model returnedDS_PR_TOOL_OK.4de03b0b-6ec4-426d-aa72-8fd066cf9246.Contribution note
I understand
CONTRIBUTING.mdnormally asks bug reporters to open issues rather than implementation PRs. Both bugs already have focused issues, and this patch is intentionally narrow, independently reviewed, and implementation-ready so maintainers can review, merge, or cherry-pick it directly. I am happy to adapt it to the maintainers' preferred shape.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.