Skip to content

feat(certifi): user certifi as a fallback when system store is not present - #6231

Merged
chenghao-mou merged 6 commits into
mainfrom
chenghao/feat/certifi-fallback
Jun 30, 2026
Merged

feat(certifi): user certifi as a fallback when system store is not present#6231
chenghao-mou merged 6 commits into
mainfrom
chenghao/feat/certifi-fallback

Conversation

@chenghao-mou

@chenghao-mou chenghao-mou commented Jun 25, 2026

Copy link
Copy Markdown
Member

LLM client uses httpx, which falls back to certifi's CA bundle, while STT/TTS plugins go through a shared aiohttp session that relied solely on the host's system trust store. On hosts without a resolvable system store (minimal containers, distroless images missing ca-certificates), aiohttp-based TLS would fail while the LLM client kept working.

The shared TCPConnector now builds its SSL context to: (1) honor SSL_CERT_FILE / SSL_CERT_DIR env overrides, (2) prefer the system trust store, and (3) fall back to certifi only when no system store is resolvable on disk. This gives consistent TLS trust roots across LLM, STT, and TTS without overriding custom system CAs when a store is present.

The fix is also applied to the worker and job process so they can both use certifi as a fallback

@chenghao-mou
chenghao-mou requested a review from a team as a code owner June 25, 2026 17:52

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

devin-ai-integration[bot]

This comment was marked as resolved.

@davidzhao davidzhao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

devin-ai-integration[bot]

This comment was marked as resolved.

@chenghao-mou
chenghao-mou merged commit 8627da8 into main Jun 30, 2026
23 checks passed
@chenghao-mou
chenghao-mou deleted the chenghao/feat/certifi-fallback branch June 30, 2026 15:29
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.

2 participants