fix: allow agents to inherit OAuth-backed host models - #841
Merged
LivXue merged 3 commits intoOct 3, 2026
Merged
Conversation
Use the runtime credential check for the inherited model binding, including stored OAuth credentials and parent session overrides. Reuse the same inheritance decision in setup while preserving raw provider settings and keeping OAuth tokens outside rendered agent configs. Cover every shipped launcher, independent keys, missing credentials, provider aliases, custom token paths, and setup readiness. Co-authored-by: Codex <noreply@openai.com>
Select the configured OpenRouter chat model in the custom image test so its image-credential assertions run with a usable inherited host binding. Add a regression proving that an unrelated provider key cannot authenticate the selected host model. Co-authored-by: Codex <noreply@openai.com>
knqiufan
force-pushed
the
fix/agents_oauth_host_inheritance
branch
from
October 3, 2026 04:35
a699451 to
a918fde
Compare
LivXue
approved these changes
Oct 3, 2026
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.
Summary
Allow all five shipped agents to inherit an OAuth-backed host model, including OpenAI Codex, by validating the inherited model binding with the runtime credential check after parent session overrides.
Type
Verification
Selected regression tests: 321 passed, 48 deselected on Windows with Python 3.12. The selection focuses on inheritance and excludes untouched POSIX permission/pruning scenarios.
The following checks passed: Ruff across the repository, formatting (2149 files), relevant type checks, all 10 import contracts, commit messages, source language and file/asset checks.
Changed-line coverage: 100% (22/22 executable lines) after normalizing the Windows report's path separators.
Full local CI remains unverified:
make cicould not run because make is unavailable. Existing POSIX file-permission tests fail on Windows.uv run --no-sync deptry ravenreports 12 missing optional channel dependencies in this environment.Risk
Inheritance now refuses an unavailable selected model even when an unrelated provider has an API key. API-key and independent-agent-key paths remain covered. Credential validation only reads stored OAuth credentials; it does not sign in or serialize tokens. Revert this change to restore the previous inheritance gate.
Related Issues
Fixes #809