refactor(agent): materialize protocol-aware model connections - #226
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
JHWang-1997
left a comment
There was a problem hiding this comment.
When judge.model selects a different provider, the runner-sourced connection values are still carried into the judge connection.
For example, with a runner endpoint at runner.example.test and a judge provider configured with judge-key and judge.example.test, the final Claude environment contains judge-key but still uses runner.example.test as ANTHROPIC_BASE_URL. This can send the judge credential to the wrong endpoint.
I confirmed that this behavior also exists on the base commit, so it is not introduced by this PR. However, this PR makes AppliedConnection authoritative and states that different judge providers are resolved independently. Could we resolve the judge connection entirely from its own provider and protocol, and add a regression test covering different runner and judge providers?
|
Thanks for catching this. Fixed in f51eb56: runner key and endpoint fallback now requires the same provider namespace. A judge selecting a different provider resolves its own connection using the inherited adapter protocol; missing values no longer fall back to the runner connection. Same-provider inheritance and agent-local delegation remain unchanged. Added regression coverage for flat and protocol-specific credentials, missing keys/endpoints, explicit-empty values, and nil-resolver inheritance. The cross-provider tests cover both Anthropic and OpenAI-compatible adapters through factory construction and the generated credential environment. Validation passed: make verify, make test (race-enabled), make test-action, make build, and make e2e (quick mode; credential-dependent cases remain gated). |
Summary
Why this scope
This is PR 4b of #196 and builds on #221 and #222. It migrates adapter materialization without adding native agent config, installation or version checks, or an independent judge-engine schema.
Compatibility
Validation
make verifymake testmake test-actionmake buildmake e2ego test -race ./internal/credential ./internal/agent ./internal/evaluator ./internal/runner ./internal/cliPart of #196.