Skip to content

fix(models): route falsey mapped providers - #3996

Merged
seratch merged 1 commit into
openai:mainfrom
hsusul:fix/multi-provider-falsey-mapping
Jul 28, 2026
Merged

fix(models): route falsey mapped providers#3996
seratch merged 1 commit into
openai:mainfrom
hsusul:fix/multi-provider-falsey-mapping

Conversation

@hsusul

@hsusul hsusul commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

This pull request fixes MultiProvider routing for explicitly mapped provider objects that evaluate to false. The prefix resolver now distinguishes a missing map entry with is not None, so an explicit MultiProviderMap entry continues to win over built-in and unknown-prefix behavior regardless of the provider's truth value.

Test plan

  • Added test_provider_map_routes_to_falsey_provider, which failed with UserError: Unknown prefix: custom before the fix and passes afterward.
  • tests/models/test_map.py: 15 passed.
  • Ran .agents/skills/code-change-verification/scripts/run.sh:
    • format, lint, mypy, and pyright passed.
    • the managed environment's full suite reached 5,747 passed and 3 skipped; 22 local websocket and Unix sandbox tests failed because the execution sandbox denied local listener/process operations with Operation not permitted.
    • an unsandboxed rerun could not start because the environment's approval service had exhausted its usage allowance. The remaining full-suite gate is therefore left to CI.

Issue number

N/A - found through code-path review; no existing issue or pull request covers falsey mapped-provider routing.

Checks

  • I've added new tests, if relevant
  • I've run .agents/skills/code-change-verification/scripts/run.sh
  • I've confirmed all verification steps pass
  • If using Codex, I've run /review before submitting this PR

@seratch
seratch merged commit ba58983 into openai:main Jul 28, 2026
9 checks passed
@seratch seratch added this to the 0.19.x milestone Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants