Skip to content

Route Ollama through the shared HTTP client - #36078

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/c7cc36845a9bceb57ce5524b9e1b3cbe317897a3
Jul 30, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/c7cc36845a9bceb57ce5524b9e1b3cbe317897a3

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

Route Ollama through the shared HTTP client

Why

Ollama requests need to honor Codex's configured outbound proxy policy and custom CA handling.

What changed

  • Replace Ollama's direct reqwest client with a route-aware client created by codex-http-client.
  • Preserve the five-second connection timeout and legacy system-root fallback for default-routed requests.
  • Reuse one Ollama client for connectivity, version, model discovery, and model-pull checks.
  • Surface HTTP transport initialization errors instead of replacing them with the generic Ollama connection error.

Testing

  • Cover system-proxy routing and invalid CODEX_CA_CERTIFICATE and SSL_CERT_FILE values under both outbound proxy policies.
  • Verify that version and model checks reuse the existing Ollama client.

## Why

Ollama requests need to honor Codex's configured outbound proxy policy and custom CA handling.

## What changed

- Replace Ollama's direct `reqwest` client with a route-aware client created by `codex-http-client`.
- Preserve the five-second connection timeout and legacy system-root fallback for default-routed requests.
- Reuse one Ollama client for connectivity, version, model discovery, and model-pull checks.
- Surface HTTP transport initialization errors instead of replacing them with the generic Ollama connection error.

## Testing

- Cover system-proxy routing and invalid `CODEX_CA_CERTIFICATE` and `SSL_CERT_FILE` values under both outbound proxy policies.
- Verify that version and model checks reuse the existing Ollama client.

GitOrigin-RevId: c7cc36845a9bceb57ce5524b9e1b3cbe317897a3
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/c7cc36845a9bceb57ce5524b9e1b3cbe317897a3 branch from 14f6082 to 7d5253d Compare July 30, 2026 04:27
@copyberry
copyberry Bot merged commit 7d5253d into main Jul 30, 2026
31 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/c7cc36845a9bceb57ce5524b9e1b3cbe317897a3 branch July 30, 2026 04:28
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 30, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — 7d5253d2 Deployed Jul 30, 2026 by capinfl via Generate label suggestions #35001
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants