Skip to content

fix(sse): cache tls-client-node binary under DATA_DIR (#8579) - #8583

Merged
diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.49from
DinonowDev:fix/8579-tls-client-datadir
Jul 27, 2026
Merged

diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.49from
DinonowDev:fix/8579-tls-client-datadir

Conversation

@DinonowDev

@DinonowDev DinonowDev commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Pass explicit downloadDir to every tls-client-node TLSClient bootstrap so the native binary is cached under <DATA_DIR>/tls-client/bin instead of the root-owned package path inside node_modules.
  • Add shared helper buildNativeTlsClientOptions() in open-sse/services/tlsClientDownloadDir.ts and wire all six web-provider TLS clients through it (chatgpt-web, claude-web, grok-web, perplexity-web, lmarena, notion-web).
  • Add regression tests asserting the download path resolves under DATA_DIR and that no TLS client constructs TLSClient without downloadDir.

Fixes #8579

Root cause

On global install (npm i -g omniroute), tls-client-node defaulted to downloading into node_modules/tls-client-node/bin, which is root-owned and fails with EACCES for normal users.

Test plan

  • node --import tsx/esm --test tests/unit/tls-client-download-dir-8579.test.ts (3 passed)

…ientOptions across multiple services

This change modifies the instantiation of TLSClient in chatgptTlsClient, claudeTlsClient, grokTlsClient, lmarenaTlsClient, notionTlsClient, and perplexityTlsClient to utilize the new buildNativeTlsClientOptions function. This refactor enhances consistency and maintainability across the TLS client implementations.
@DinonowDev
DinonowDev requested a review from diegosouzapw as a code owner July 25, 2026 15:36
@diegosouzapw
diegosouzapw merged commit eadb28c into cheaper-inference:release/v3.8.49 Jul 27, 2026
3 checks passed
@diegosouzapw diegosouzapw mentioned this pull request Jul 28, 2026
HouMinXi pushed a commit to HouMinXi/OmniRoute that referenced this pull request Aug 2, 2026
…ientOptions across multiple services (cheaper-inference#8583)

This change modifies the instantiation of TLSClient in chatgptTlsClient, claudeTlsClient, grokTlsClient, lmarenaTlsClient, notionTlsClient, and perplexityTlsClient to utilize the new buildNativeTlsClientOptions function. This refactor enhances consistency and maintainability across the TLS client implementations.
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…ientOptions across multiple services (cheaper-inference#8583)

This change modifies the instantiation of TLSClient in chatgptTlsClient, claudeTlsClient, grokTlsClient, lmarenaTlsClient, notionTlsClient, and perplexityTlsClient to utilize the new buildNativeTlsClientOptions function. This refactor enhances consistency and maintainability across the TLS client implementations.
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.

fix(backend): tls-client-node binary downloads into node_modules — EACCES on global install breaks chatgpt-web/Grok/Claude-web

2 participants