Skip to content

feat(provider): configurable TLS verification for OpenAI clients#101

Merged
duguwanglong merged 2 commits intomainfrom
feat/provider-verify-ssl
Apr 13, 2026
Merged

feat(provider): configurable TLS verification for OpenAI clients#101
duguwanglong merged 2 commits intomainfrom
feat/provider-verify-ssl

Conversation

@xiami762
Copy link
Copy Markdown
Contributor

@xiami762 xiami762 commented Apr 13, 2026

Summary

Adds configurable TLS certificate verification for OpenAI, OpenAI Base, and OpenAI Compatible providers via custom_settings (verify_ssl / ssl_verify).

Changes

  • Resolve verify_ssl from provider custom settings and pass verify= to httpx.AsyncClient used by the OpenAI SDK.
  • Preserve custom_settings when setting or testing provider credentials in API routes.
  • Extend .flocks/flocks.json.example with an internal gateway example.
  • Add unit tests for OpenAI, OpenAI Base, OpenAI Compatible, and credential test flow.

Testing

uv run pytest on the new/updated provider tests (verify_ssl and custom_settings preservation).

xiami762 added 2 commits April 13, 2026 13:21
- Add resolve_verify_ssl from custom_settings (verify_ssl / ssl_verify)
- Pass httpx.AsyncClient(verify=...) to OpenAI, OpenAIBase, OpenAICompatible
- Preserve custom_settings when setting or testing provider credentials
- Document example provider with verify_ssl in flocks.json.example
- Add unit tests; minor README fixes

Made-with: Cursor
Avoid maintaining duplicate _coerce_bool implementations by importing the shared helper from openai_base.

Made-with: Cursor
@duguwanglong duguwanglong merged commit 29c27b3 into main Apr 13, 2026
2 checks passed
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