Skip to content

fix(provider): add 'active' to model status schema validation#6

Open
herjarsa wants to merge 580 commits into
devfrom
fix/provider-model-status-active
Open

fix(provider): add 'active' to model status schema validation#6
herjarsa wants to merge 580 commits into
devfrom
fix/provider-model-status-active

Conversation

@herjarsa
Copy link
Copy Markdown
Owner

@herjarsa herjarsa commented May 9, 2026

Issue for this PR

Closes anomalyco#26589

Type of change

  • Bug fix

What does this PR do?

The /config endpoint was returning 400 Bad Request because the Omniroute provider returns models with status: "active", but the Model schema in packages/opencode/src/config/provider.ts only 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.Literals did not include "active".

Fix: Added "active" to the Schema.Literals(["alpha", "beta", "deprecated", "active"]) in the Model status field.

How did you verify your code works?

  • New test case added in packages/opencode/test/provider/models.test.ts that verifies models with status: "active" are accepted
  • Ran bun test test/provider/models.test.ts --test-name-pattern "accepts model status" — test passes
  • User confirmed TUI loads successfully after the fix

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

kitlangton and others added 30 commits May 1, 2026 07:36
…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.
…ovider (anomalyco#21114)

Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
opencode and others added 30 commits May 7, 2026 00:34
Co-authored-by: jesse.mahnken <jesse.mahnken@tiefox.de>
Co-authored-by: LukeParkerDev <10430890+Hona@users.noreply.github.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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: /config endpoint returns 400 when provider returns models with status: 'active'