feat(model): unify harness model compatibility and custom provider options across Core and Web UI - #230
Open
elf-mouse wants to merge 1 commit into
Open
Conversation
elf-mouse
force-pushed
the
feat/unified-harness-model-options
branch
2 times, most recently
from
August 5, 2026 06:41
b929c58 to
cdec772
Compare
…tions across Core and Web UI This commit comprehensively unifies harness and model selection logic across Core and Web UI for both custom providers and proxy base URLs: 1. `src/model/custom-providers.ts` & `src/model/pi-models.ts`: - Route custom provider models to harnesses according to their protocol (`openai` or `anthropic`). - Symmetrically update `modelProviderAvailabilityFor()` for `claude` and `codex` harnesses based on proxy base URLs and custom providers. 2. `src/api/routes/surface.ts`: - Include active custom providers in `modelProviderConfigured` checks to prevent false 302 redirects to `/admin/onboarding`. 3. `src/api/app-turn.ts` & `src/core/turn-options.ts`: - Restore `else if (providers?.openrouter)` in `app-turn.ts` and merge `customModelCatalog()` into `validateWebTurnModelOptions` fallback in `turn-options.ts`, seamlessly validating custom provider models without altering OpenRouter dynamic resolution. 4. `plugins/web-ui/src/pi-models.ts` & `plugins/web-ui/src/model-options.ts`: - Enable generic template cloning in `getBaseModel()` and dynamic label resolution in `buildOption()` for custom models. - Update `runtimeModelOptions()` to strictly honor Core's `modelsByHarness` output without forcibly inserting fallback built-in models.
elf-mouse
force-pushed
the
feat/unified-harness-model-options
branch
from
August 5, 2026 06:49
cdec772 to
3df8337
Compare
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.
This commit comprehensively unifies harness and model selection logic across Core and Web UI for both custom providers and proxy base URLs:
src/model/custom-providers.ts&src/model/pi-models.ts:openaioranthropic).modelProviderAvailabilityFor()forclaudeandcodexharnesses based on proxy base URLs and custom providers.src/api/routes/surface.ts:modelProviderConfiguredchecks to prevent false 302 redirects to/admin/onboarding.plugins/web-ui/src/pi-models.ts&plugins/web-ui/src/model-options.ts:getBaseModel()and dynamic label resolution inbuildOption()for custom models.runtimeModelOptions()to strictly honor Core'smodelsByHarnessoutput without forcibly inserting fallback built-in models.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.