Skip to content

fix: respect UIPATH_DISABLE_SSL_VERIFY in boto3 bedrock client#712

Open
smflorentino wants to merge 2 commits intomainfrom
fix/bedrock-ssl-verify-parity
Open

fix: respect UIPATH_DISABLE_SSL_VERIFY in boto3 bedrock client#712
smflorentino wants to merge 2 commits intomainfrom
fix/bedrock-ssl-verify-parity

Conversation

@smflorentino
Copy link
Collaborator

@smflorentino smflorentino commented Mar 19, 2026

Summary

GPT/OpenAI models and Anthropic/Bedrock models use different HTTP client stacks to talk to the LLM Gateway, even though both hit the same AgentHub endpoint:

  • GPT path: UiPathChatOpenAI uses httpx, which goes through create_ssl_context() in _http_config.py. This respects UIPATH_DISABLE_SSL_VERIFY and truststore (OS system certs).
  • Anthropic path: UiPathChatBedrockConverse uses boto3/urllib3, which creates its own SSL context internally. It never calls create_ssl_context() and does not check UIPATH_DISABLE_SSL_VERIFY.

In environments with self-signed certificates in the TLS chain, the httpx path works (it trusts the cert via truststore or the disable flag), but the boto3 path fails with SSL: CERTIFICATE_VERIFY_FAILED.

Changes

  • Import is_ssl_verification_disabled() from uipath-platform (new in 0.1.1)
  • Add _get_verify() to AwsBedrockCompletionsPassthroughClient
  • Pass verify= to both session.client() calls (get_client() and get_bedrock_client())

Companion PR

Test plan

  • Added TestSslVerification (5 tests) covering default verify=True and disabled verify=False for both clients
  • All existing bedrock tests pass
  • Integration test: mitmproxy reverse proxy with self-signed cert, verify both GPT and Anthropic models succeed with UIPATH_DISABLE_SSL_VERIFY=true
  • Note: CI will fail on uv sync --locked until uipath-platform 0.1.1 is published. After merge of companion PR, run uv cache clean uipath-platform && uv lock --refresh and push the updated uv.lock.

smflorentino and others added 2 commits March 19, 2026 15:46
The boto3/urllib3 HTTP path used for Anthropic models did not check
UIPATH_DISABLE_SSL_VERIFY, causing SSL failures in environments with
self-signed certificates (e.g. HDENS) even when the env var was set.
The httpx path (GPT models) already respected it.

Pass verify=False to boto3 session.client() when the env var is set,
using the new is_ssl_verification_disabled() from uipath-platform.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Requires is_ssl_verification_disabled() added in uipath-platform 0.1.1.
Also updates range upper bound from <0.1.0 to <0.2.0.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@smflorentino smflorentino force-pushed the fix/bedrock-ssl-verify-parity branch from 244ea33 to 29b13eb Compare March 19, 2026 22:47
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