Skip to content

refactor: centralize provider mode helper for host integrations#103

Merged
rlippmann merged 6 commits intomainfrom
codex/providers
Apr 22, 2026
Merged

refactor: centralize provider mode helper for host integrations#103
rlippmann merged 6 commits intomainfrom
codex/providers

Conversation

@rlippmann
Copy link
Copy Markdown
Owner

What changed

  • Introduced a shared host-side provider helper at host_support/provider_mode.py for strict provider mode resolution and one-time startup logging.
  • Refactored LiteLLM integration examples and demo LLM client to use the shared helper, preserving existing provider-mode behavior.
  • Kept numbered examples non-package style by restoring local _util imports and removing examples/init.py.
  • Updated tests to cover shared helper behavior and adjusted integration/demo tests to use the new helper import path.
  • Updated wheel packaging to include host_support so integrations and demos can import the shared helper from built artifacts.

Why this was needed

  • Avoid duplicated provider-resolution logic across examples and demos.
  • Keep host/integration concerns out of engine code while still avoiding examples package coupling.
  • Ensure packaged wheels contain both examples/... and host_support/provider_mode.py for runtime parity.

@rlippmann rlippmann merged commit b658145 into main Apr 22, 2026
12 checks passed
@rlippmann rlippmann deleted the codex/providers branch April 22, 2026 08:05
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