Skip to content

relay#562: adopt resolves a broker-served model to its alias - #565

Merged
barelyworkingcode merged 3 commits into
epic/525-session-adoptionfrom
fix/562-adopt-broker-model
Oct 21, 2026
Merged

barelyworkingcode merged 3 commits into
epic/525-session-adoptionfrom
fix/562-adopt-broker-model

Conversation

@barelyworkingcode

Copy link
Copy Markdown
Owner

Closes #562

Adopt refused a terminal Claude that runs on relay's model broker with model_unknown, because only claude-* ids mapped to a family. Now, when the caller sends no model and the transcript has no Claude family, relay resolves the transcript's model id through the broker's own alias map. It reads a fresh catalog per request, finds the map keys that serve the id, and maps each key to the alias (haiku, sonnet, opus) whose ANTHROPIC_DEFAULT_<F>_MODEL names it. Exactly one alias adopts, and the adopted session gets that alias, so it reaches the same broker model. Zero aliases, several, no match or an unreadable catalog still refuse 409 model_unknown, before anything is signalled.

A caller-sent model and a claude-* family still win, unchanged. The wire shape and fakerelay are unchanged.

The epic (with relay#561) was merged in. The G1.50 proof cell keeps both PRs' test names.

Review notes (minor, not fixed): the unreadable-catalog branch has no test of its own.

Fix attempts: 1. Tokens: about 400k across subagents (planner, tests, dev, real-app check, review).

Red on main: TestAdoptBrokerModelAdoptsWithAlias key and target red on the epic head 7ec4af5 (409 model_unknown, want 201); green on 2cf5daa
Real-app check: eve outside-adopt journey on a fresh stack r562: epic 705e9e7 FAIL 409 model_unknown; 2cf5daa PASS (201, session adopted, audit session_adopt ok)
Journey: outside-adopt (eve devboxverify, stack r562) PASS on 2cf5daa
Review: no blocking findings (default model, round 1)

🤖 Generated with Claude Code

barelyworkingcode and others added 3 commits October 20, 2026 20:34
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…fix/562-adopt-broker-model

# Conflicts:
#	docs/FEATURES.md
@barelyworkingcode
barelyworkingcode merged commit 041d5e6 into epic/525-session-adoption Oct 21, 2026
@barelyworkingcode
barelyworkingcode deleted the fix/562-adopt-broker-model branch October 21, 2026 03:51
@barelyworkingcode

Copy link
Copy Markdown
Owner Author

merge-check: merged. approved, target, contract, evidence, owner, weakening

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.

1 participant