fix(provider): add 'active' to model status schema validation#6
Open
herjarsa wants to merge 580 commits into
Open
fix(provider): add 'active' to model status schema validation#6herjarsa wants to merge 580 commits into
herjarsa wants to merge 580 commits into
Conversation
…prompts Agents can now create temporary files in the global tmp directory without triggering external_directory permission prompts. This enables agents to freely use temporary storage for intermediate files during builds and other operations.
… without installed packages (anomalyco#25354)
…ovider (anomalyco#21114) Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
Co-authored-by: jesse.mahnken <jesse.mahnken@tiefox.de>
Co-authored-by: LukeParkerDev <10430890+Hona@users.noreply.github.com>
…omalyco#26037) Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
Detect when MCP client transport closes unexpectedly (server crash, network drop, process exit) and immediately mark the connection status as 'failed' instead of leaving it as 'connected'. This fixes the issue where the TUI/API would continue to show MCP servers as online (green) even though they had stopped responding. Fixes anomalyco#23997
Add "active" to the Model.status schema literals in: - packages/opencode/src/config/provider.ts Omniroute provider returns models with status: "active", but the schema only allowed ["alpha", "beta", "deprecated"]. This caused schema validation to fail with 400 Bad Request on /config endpoint. Fixes TUI crash: "opencode server GET http://opencode.internal/config → 400: (empty response body)" Closes anomalyco#26589
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.
Issue for this PR
Closes anomalyco#26589
Type of change
What does this PR do?
The
/configendpoint was returning 400 Bad Request because the Omniroute provider returns models withstatus: "active", but the Model schema inpackages/opencode/src/config/provider.tsonly allowed["alpha", "beta", "deprecated"]as valid status values. This caused Effect schema validation to fail.Root cause: Schema validation error in the Effect-based schema validation layer — the literal values in
Schema.Literalsdid not include "active".Fix: Added
"active"to theSchema.Literals(["alpha", "beta", "deprecated", "active"])in the Model status field.How did you verify your code works?
packages/opencode/test/provider/models.test.tsthat verifies models withstatus: "active"are acceptedbun test test/provider/models.test.ts --test-name-pattern "accepts model status"— test passesChecklist