unsloth/studio/frontend/src/features/chat/utils
Tai An 7337729e57
fix(studio/llama_cpp): disable trust_env on the loopback health probe (#6750) (#6752)
* fix(studio/llama_cpp): disable trust_env on the loopback health probe

_wait_for_health() polls http://127.0.0.1:<port>/health with the default
httpx trust_env=True, so an ambient HTTP(S)_PROXY in the environment is
applied to the loopback request. A proxy that returns 503 for 127.0.0.1
makes every probe fail, so the loop runs until timeout and Studio load
hangs (trust_env=False returns 200 immediately).

Pass trust_env=False so the local readiness probe never goes through a
proxy. This mirrors the existing trust_env=False handling in the sibling
llama_http / external_provider HTTP clients.

* test(offline_gguf_cache): accept trust_env kwarg in fake_get mock

_wait_for_health now calls httpx.get(..., trust_env=False); update the retry test's fake_get to accept the kwarg so it doesn't raise TypeError.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix(studio/llama_cpp): bypass proxies for loopback clients

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix(studio/routes): bypass proxies for llama streams

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: wasimysaid <wasimysdev@gmail.com>
2026-06-30 19:09:26 +02:00
..
chat-history-storage.ts Studio: add temporary (incognito) chat (#5956) 2026-06-14 16:41:57 +01:00
chat-settings-storage.ts Studio: prompt variables into prompt editor (#6434) 2026-06-25 18:09:16 +01:00
chat-thread-tombstones.ts Studio frontend: reduce and tighten code comments (#6099) 2026-06-08 23:10:35 -07:00
clear-all-chats.ts Studio: persist chat history in backend storage (#5272) 2026-05-22 06:18:05 -07:00
composer-draft.ts Studio: new-chat shortcut, composer draft autosave, archive threads (#5771) 2026-06-12 13:36:31 +01:00
delete-thread-message.ts Studio: cascade user message deletion to include assistant reply (#6720) 2026-06-28 04:16:03 -07:00
export-chat-history.ts Studio: persist chat history in backend storage (#5272) 2026-05-22 06:18:05 -07:00
format-transfer.ts Studio frontend: reduce and tighten code comments (#6099) 2026-06-08 23:10:35 -07:00
image-input-support.ts Studio: self-heal unsloth namespace shadows; clearer failed-load messages (#6532) 2026-06-21 22:43:31 -07:00
parse-assistant-content.ts Studio frontend: reduce and tighten code comments (#6099) 2026-06-08 23:10:35 -07:00
prompt-queue-boundary.ts Studio: queue chat prompts while generation is running (#6244) 2026-06-15 17:03:57 +02:00
qwen-params.ts Studio: persist chat toggles and preserve custom sampling (#5587) 2026-05-19 22:03:00 +04:00
thread-ids.ts Studio: add temporary (incognito) chat (#5956) 2026-06-14 16:41:57 +01:00
transfer-stats.ts Studio frontend: reduce and tighten code comments (#6099) 2026-06-08 23:10:35 -07:00
update-thread-message.ts fix(studio/llama_cpp): disable trust_env on the loopback health probe (#6750) (#6752) 2026-06-30 19:09:26 +02:00