Skip to content

[Bug]: disable_ssl_verify: true, and I still self-signed certificate in certificate chain #530

Description

@yanOnGithub

Do you need to file an issue?

  • I have searched the existing issues and this bug is not already filed.
  • I believe this is a legitimate bug, not just a question or feature request.

Describe the bug

This is like #464. I have already upgraded to v1.4.1.

Llm test failed. Embedding model test worked.

Steps to reproduce

run llm test

open settings > llm > test llm
llm test would fail with ssl self-signed certificate error

Expected Behavior

http ssl connection to llm connection should work like curl -k

Related Module

API/Backend

Configuration Used

In data/user/settings/system.json

set disable_ssl_verify: true
and migrated other stuff used to be in .env

In data/user/settings/main.yaml

set logging.level = DEBUG

re-create container

docker compose -f docker-compose.ghcr.yml down
docker compose -f docker-compose.ghcr.yml up -d

Logs and screenshots

docker logs -t -f deeptutor

2026-05-28T09:14:14.285109851Z WARNING deeptutor.services.llm.openai_http_client - SSL verification is disabled via DISABLE_SSL_VERIFY. This is unsafe and must not be used in production environments.
2026-05-28T09:14:14.289965982Z INFO: 172.18.0.1:58374 - "GET /api/v1/settings/tests/llm/llm-a3d4fc42d7/events HTTP/1.1" 200 OK
2026-05-28T09:14:14.949309288Z DEBUG openai._base_client - Request options: {'method': 'post', 'url': '/chat/completions', 'files': None, 'idempotency_key': 'stainless-python-retry-620bb851-71b7-45ee-9c68-bda525267bda', 'security': {'bearer_auth': True}, 'content': None, 'json_data': {'messages': [{'role': 'system', 'content': 'Respond briefly but include your model identity if possible.'}, {'role': 'user', 'content': "Say 'OK' and identify the model you are using."}], 'model': 'gpt-oss-20b', 'max_completion_tokens': 4096, 'temperature': 0.5}}
2026-05-28T09:14:14.950265318Z DEBUG openai._base_client - Sending HTTP Request: POST https://gpt-oss-20b-company.com.hk/v1/chat/completions
2026-05-28T09:14:14.950839391Z DEBUG httpcore.connection - connect_tcp.started host='gpt-oss-20b-company.com.hk' port=443 local_address=None timeout=5.0 socket_options=None
2026-05-28T09:14:14.957181236Z DEBUG httpcore.connection - connect_tcp.complete return_value=<httpcore._backends.anyio.AnyIOStream object at 0x7f450c0aa010>
2026-05-28T09:14:14.957405760Z DEBUG httpcore.connection - start_tls.started ssl_context=<ssl.SSLContext object at 0x7f450caefc80> server_hostname='gpt-oss-20b-company.com.hk' timeout=5.0
2026-05-28T09:14:14.966965739Z DEBUG httpcore.connection - start_tls.complete return_value=<httpcore._backends.anyio.AnyIOStream object at 0x7f450c0a9e50>
2026-05-28T09:14:14.967386699Z DEBUG httpcore.http11 - send_request_headers.started request=<Request [b'POST']>
2026-05-28T09:14:14.968001035Z DEBUG httpcore.http11 - send_request_headers.complete
2026-05-28T09:14:14.968201081Z DEBUG httpcore.http11 - send_request_body.started request=<Request [b'POST']>
2026-05-28T09:14:14.968535796Z DEBUG httpcore.http11 - send_request_body.complete
2026-05-28T09:14:14.968729389Z DEBUG httpcore.http11 - receive_response_headers.started request=<Request [b'POST']>
2026-05-28T09:14:15.532459583Z DEBUG httpcore.http11 - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'content-length', b'1090'), (b'content-type', b'application/json'), (b'date', b'Thu, 28 May 2026 09:14:14 GMT'), (b'server', b'uvicorn'), (b'set-cookie', b'7de79dafbd33b7217c9e602ef0ca1127=0ff5035aed7577547d0710a58b1d538f; path=/; HttpOnly; Secure; SameSite=None')])
2026-05-28T09:14:15.533534754Z INFO httpx - HTTP Request: POST https://gpt-oss-20b-company.com.hk/v1/chat/completions "HTTP/1.1 200 OK"
2026-05-28T09:14:15.533780849Z DEBUG httpcore.http11 - receive_response_body.started request=<Request [b'POST']>
2026-05-28T09:14:15.534068740Z DEBUG httpcore.http11 - receive_response_body.complete
2026-05-28T09:14:15.534305248Z DEBUG httpcore.http11 - response_closed.started
2026-05-28T09:14:15.534579780Z DEBUG httpcore.http11 - response_closed.complete
2026-05-28T09:14:15.534971692Z DEBUG openai._base_client - HTTP Response: POST https://gpt-oss-20b-company.com.hk/v1/chat/completions "200 OK" Headers({'content-length': '1090', 'content-type': 'application/json', 'date': 'Thu, 28 May 2026 09:14:14 GMT', 'server': 'uvicorn', 'set-cookie': '7de79dafbd33b7217c9e602ef0ca1127=0ff5035aed7577547d0710a58b1d538f; path=/; HttpOnly; Secure; SameSite=None'})
2026-05-28T09:14:15.535174017Z DEBUG openai._base_client - request_id: None
2026-05-28T09:14:15.561640866Z DEBUG deeptutor.services.config.context_window_detection - Context-window metadata request failed for https://gpt-oss-20b-company.com.hk/v1/models: Cannot connect to host gpt-oss-20b-company.com.hk:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1016)')]
2026-05-28T09:14:35.594225649Z INFO: 127.0.0.1:47624 - "GET / HTTP/1.1" 200 OK

Additional Information

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions