Repository navigation
Description
Problem
The settings check accepts typesafe/jev-router as a decision model, but that model is a chat router that writes text.
is_decision_model_name(src/devops_cli/config/settings.py:928-938) accepts each name that starts withCONST_AI_JEV_MODEL_TARGETS(typesafe/jev-,jev-). A local run gives True fortypesafe/jev-routerandjev-router. A config withai.decision_model: typesafe/jev-routerloads as valid._is_jev_decision_name(src/devops_cli/ai/pydantic_ai_bridge.py:125-127) gives True foropenai-chat:jev-routertoo. So a task route with that name becomes aSystemOneModel, and its calls fail.pydantic_ai_bridge.py:68uses the same prefix test.- The public OpenRouter models API (
GET https://openrouter.ai/api/v1/models) liststypesafe/jev-routerwith output modality text and prompt price -1. The OpenRouter guide says that Jev picks the model and the picked model writes the reply. - The field text of
ai.decision_modelsays that a model that writes text is refused. The check does not do that. - The gain is preventive. No config, template or code names
jev-routernow (git grepis empty). A later router trial with a name that starts withjev-would hit it.
Expected
- The check accepts a Jev name only when a version follows
jev-, for example the pattern^(typesafe/)?jev-\d. The same rule applies in the prefixed branch ofis_decision_model_nameand inpydantic_ai_bridge.py:68. - Test first: the settings load refuses
ai.decision_model: typesafe/jev-router. A task routeopenai-chat:jev-routerdoes not become aSystemOneModel.typesafe/jev-1.14andjev-1.13still pass.
Alternatives check of 2026-11-19: none.
Tool: none found.
Reason: Searches found no open library that validates decision-model names; the fix is a project-internal regex shared by settings.py and pydantic_ai_bridge.py, which no external tool supplies.
Lacks:
- A version requirement after the
jev-prefix - Refusal of
openai-chat:jev-routerin task routes - One shared prefix rule for settings and bridge tests
Proposed design
Problem statement
The settings check accepts typesafe/jev-router as a decision model because it matches the typesafe/jev- prefix. The bridge then builds a SystemOneModel for openai-chat:jev-router, and its calls fail. The change requires a version digit after jev- and refuses router names while keeping typesafe/jev-1.14 and jev-1.13.
Acceptance criteria
Requirement: Unprefixed router names are refused
The decision-model name check SHALL accept a Jev name only when a digit follows jev-.
Scenario: Router target is refused
- WHEN a test calls
is_decision_model_namewithtypesafe/jev-routerand withjev-router - THEN both calls return
False.
Requirement: Versioned Jev names stay accepted
The decision-model name check SHALL accept versioned Jev names.
Scenario: Versioned targets pass
- WHEN a test calls
is_decision_model_namewithtypesafe/jev-1.14and withjev-1.13 - THEN both calls return
True.
Requirement: Settings refuse router decision model
The settings loader SHALL refuse a config whose ai.decision_model is typesafe/jev-router.
Scenario: Config load fails
- WHEN a test loads a config with
ai.decision_model: typesafe/jev-router - THEN the load raises a validation error and returns no valid settings object.
Requirement: Prefixed router name is refused
The prefixed-name check SHALL refuse openai-chat:jev-router as a Jev decision model.
Scenario: Prefixed router target is refused
- WHEN a test calls
is_decision_model_namewithopenai-chat:jev-routerand calls_is_jev_decision_namewith the same name - THEN both calls return
False.
Requirement: Bridge route avoids SystemOneModel
The bridge SHALL NOT build a SystemOneModel for the task route openai-chat:jev-router.
Scenario: Router task route stays a chat model
- WHEN a test calls
resolve_pydantic_ai_modelfor the task routeopenai-chat:jev-routerwith a chat provider - THEN the result is not an instance of
SystemOneModel.
Requirement: Bridge uses the shared Jev target rule
The bridge SHALL call is_jev_model_target at src/devops_cli/ai/pydantic_ai_bridge.py:68.
Scenario: Shared target rule refuses router
- WHEN a test calls
is_jev_model_targetwithjev-routerand withtypesafe/jev-router - THEN both calls return
False.
Existing Tool Considered
The alternatives check of 2026-11-19 records verdict none with no tool. The alternatives block in the issue body gives its searches and lacks. The change builds a shared project regex. Written cost: about 10k tokens and 1 hour to write, test and keep that code.
Key questions
- What name pattern identifies a Jev decision model?: A Jev target matches
^(typesafe/)?jev-\d. The name must have a digit afterjev-, sojev-routerandtypesafe/jev-routerdo not match, whilejev-1.13andtypesafe/jev-1.14do. (best practice) [sources: src/devops_cli/config/settings.py:928, src/devops_cli/config/constants.py:3077, src/devops_cli/ai/pydantic_ai_bridge.py:125]- Rejected: Keep the current prefix match. It accepts
typesafe/jev-routerandjev-router, so a chat router becomes a decision model. - Chosen: Require a version digit after
jev-. It keepstypesafe/jev-1.14andjev-1.13and refuses names with no version.
- Rejected: Keep the current prefix match. It accepts
- Where should the version rule live so the settings check and the bridge cannot drift?: Add
is_jev_model_targetinsrc/devops_cli/config/settings.py. Use it inis_decision_model_name, in_is_jev_decision_name, and atsrc/devops_cli/ai/pydantic_ai_bridge.py:68. (best practice) [sources: src/devops_cli/config/settings.py:928, src/devops_cli/ai/pydantic_ai_bridge.py:68, src/devops_cli/ai/pydantic_ai_bridge.py:125]- Rejected: Duplicate the regex in both files. Two copies can drift, and the issue asks for one shared rule.
- Chosen: Add one shared helper. Settings and bridge call the same rule, so a later change reaches both paths.
- Should a valid versioned Jev name still resolve to a
SystemOneModel?: Yes.typesafe/jev-1.14must still resolve to aSystemOneModel, as the deployment spec requires. [sources: openspec/specs/roadmap-service-deployment/spec.md:93, src/devops_cli/config/settings.py:928] - Should a prefixed router name be refused by the prefixed branch?: Yes. The prefixed branch must apply the same version rule, so
openai-chat:jev-routeris not a Jev decision model and does not become aSystemOneModel. (best practice) [sources: src/devops_cli/config/settings.py:928, src/devops_cli/ai/pydantic_ai_bridge.py:125, src/devops_cli/ai/pydantic_ai_bridge.py:68]- Rejected: Keep the prefix-only check in the prefixed branch. It accepts
openai-chat:jev-routerand builds a failingSystemOneModel. - Chosen: Apply the version rule to the target after the prefix. It refuses the router target and keeps versioned Jev targets.
- Rejected: Keep the prefix-only check in the prefixed branch. It accepts
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 19, 2026
Both concern Jev decision model work, but the candidate fixes a validation regex while #4408 is a roadmap tracker for the broader effort.devops-cli-service commentedon Nov 19, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (10)
Searches run:
Sources:
devops-cli-service commentedon Nov 19, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
chore(main): release 0.220.0 (#7199)
devops-cli-service commentedon Nov 25, 2026
Released in v0.220.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.220.0
devops-cli-service commentedon Nov 25, 2026
Live since 2026-11-25 17:24 UTC