Skip to content

[BUG]: Client fails TLS connection for Xiaomi Token Plan while terminal works #26006

Closed as not planned

Description

@dadadedahuamao

Description

Xiaomi Token Plan (Singapore) works correctly when used from the terminal, but the OpenCode desktop/client UI cannot connect to the same API endpoint.

What happened:

  • The Xiaomi Token Plan (Singapore) provider/configuration can be used normally in the terminal.
  • With the same provider/configuration in the OpenCode client, API requests fail.
  • The client shows an error similar to:
Cannot connect to API: Client network socket disconnected before secure TLS conn...

This looks like a client-side networking or TLS handling issue because the same API access works outside the client.

Expected behavior:

  • The OpenCode client should use the same working network/API configuration as the terminal.
  • If the terminal can connect to Xiaomi Token Plan (Singapore), the client should also be able to establish the TLS connection and send API requests successfully.

Steps to reproduce:

  1. Configure Xiaomi Token Plan (Singapore) as the API provider/model source.
  2. Verify that it works normally from the terminal.
  3. Open the OpenCode client with the same configuration.
  4. Send a request from the client.
  5. The client fails with Cannot connect to API: Client network socket disconnected before secure TLS conn....

Plugins:
None / not relevant.

OpenCode Version:
v1.14.39

Operating System:
Windows 11

Terminal:
Windows Terminal

Activity

  1. github-actions commented on May 6, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If your issue is distinct (e.g., specific to the Xiaomi Token Plan endpoint or a different root cause), please add details clarifying how it differs.

  2. github-actions commented on Jul 8, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions