Repository navigation
relay#384: refuse a raw-model start whose model its kind does not offer - #499
Merged
Merged
Conversation
…rs launches anyway Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Owner
Author
|
Verified: 2c5e97b · repo-suite: ok relaye2e/features 478.564s · devboxverify: SUMMARY pass=5 fail=0 blocked=0 notrun=2 (stack r384, --phase api) · real-app: seen before on main (--model codex started a session), gone on head (refused, model_not_offered with choices; haiku still starts) · log: test machine /tmp/r384-e2e.log, /tmp/r384-dbv.log, /tmp/r384-realapp.log |
Owner
Author
|
merge-check: merged. approved, target, verified, contract, evidence, owner, weakening |
Owner
Author
|
Merged: approved, target, verified, contract, evidence PASS; ci NA; no gate or weakening hits. |
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.
Closes #384
What changed
A fresh chat, codex or pi start with a raw
modeland no agent entry is checked against the models its kind offers before launch. This is the check agent-entry starts already run. It sits inAuthorizeLaunch, the one core behindPOST /api/sessions,relay session start(flags and--file), the bridgesession.startop and the Chief of Staff start.400 model_not_offered. The message names the model and the kind, and lists the offered models the project allows (at most 50), spelled as--modeltakes them.codexorpigets a spelling hint:codex/<model>,pi/relay-router/<model>. A bareclaudegetshaiku, sonnet or opus.503 models_unavailable, the same as entry starts. Fails closed.session.launchandchief_of_staff.startenddeniedwith the code asreasonand the requestedmodel.routes.md,cli.md,events.md, FEATURES rows G1.01 and G1.26.What a person notices: asking the Chief of Staff for a "codex session" now gets a refusal that lists real choices. It no longer gets a session that dies with "prompt could not be delivered".
Proof
launch failedand 502prompt_not_delivered.checkRawModelreturn nil turnsTestBug384RawModelNotOfferedRefusedred (--model codex exited 0, want 1). The restore is byte for byte. The entry is ine2e/coverage/proof/breaks.json.relay session start --model codexwithstarted session …, exit 0. The head build answers withmodel "codex" is not offered for chat; models: …; for a codex session use codex/<model>, exit 1.nosuchmodel-xyzis refused the same way.haikustill starts.Notes
codex/codex, which no model offers, and the events doc. The third minor finding stays: one kind assertion inTestBug384RawCodexAndPiModelNotOfferedrepeats another, harmless. Tokens: about 560k across subagents.endRawModelRefusalends a raw-model 503denied, which criterion 14 requires. Entry-start 503s still enderror.events.mdsays so.Review: no blocking (round 1, default model; minors fixed in 33b0a42)
Red on main: TestBug384RawModelNotOfferedRefused and three more fail on main's code at the refusal assertion (exit 0 / 201 / 502)
Real-app check: seen before on the installed main build (--model codex starts a session); gone on the head build (refused, names codex, lists offered models)
Break-and-restore: checkRawModel returns nil -> TestBug384RawModelNotOfferedRefused red; restored byte for byte
Journey: n/a: the stack api run is green; no journey starts a raw model the catalogue lacks
🤖 Generated with Claude Code