#6512 [TUI] Update the OpenCode providers config to conform to the v2 schema

open · @Drewlius · 0 comentarios · En GitHub

Descripción

## Problem

`strata connect opencode` wrote the OpenCode v1 config shape (`provider.npm`,
`provider.options`, model-level `tool_call`/`reasoning`). OpenCode 2.x reads the
v2 `providers` schema, so the generated config was ignored.

## Result

The generated file now uses `providers.strata` with `package` and `settings`,
and model-level `capabilities`, `compatibility`, `variants`, and `limit`. 

## Approach

- Edits to `opencode_file()` in `terminal/strata_cli/launch/harness.py`.
- Edits to `_keep_output_cap()` to read `providers`.
- Updated the 8 test units in `test_client_output_cap_0213.py` to v2 keys.

This changes the default output for every OpenCode user there is no opt-in
flag. the old default is deprecated and is phasing out.

## Validation

Passed:
- `PYTHONPATH=terminal python3 -m pytest terminal/tests/terminal/test_client_output_cap_0213.py -q` — 8 passed.
- End-to-end render from the repo CLI with emits the v2 block.
- Emitted keys checked against the published config schema no unknown keys at top, provider or variant level.
- all settings conform to opencode, strata, and qwen model card, even where the settings are the default I still listed them in the model config for transparency and for a power users reference.

Failed: 

none of the tests I ran

Not run:
- Full `terminal/tests/terminal` suite.

## Limits

Full test suite not ran only those relating to this config write change
this project write a `JSON` file not the `JSONC` so I have explicitly labeled it as such where I found it stated to be `JSONC`

En el sitio

Enlaces a install, modelos, releases.