unsloth/studio/backend/core
Daniel Han 6403846bbe Studio: spoof-aware Codex availability probe + autouse fixture
When ``UNSLOTH_CODEX_SPOOF=1`` is exported (the credit-free dev / CI
path the previous commit added), the in-process spoof IS the Codex
SDK and a real ``codex`` CLI is irrelevant. The status endpoint at
``/api/codex/status`` used to gate ``installed`` on the real CLI +
real SDK only, which made the frontend hide the Codex provider in
the connections dropdown even when the spoof was active. Now both
``_sdk_importable`` and ``probe_codex_availability`` short-circuit on
``codex_spoof.is_spoof_enabled()`` so the provider becomes visible
under the spoof. ``installed=True``, ``cli_path="<spoof>"``,
``logged_in=True``, ``version="spoof"`` -- a sentinel that lets devs
read off "yes I am under the spoof" at a glance.

Real production code path (no spoof flag) is unchanged: still gates
on bool(cli_path) AND sdk_ok the same as round 6.

Tests: added an autouse fixture in ``test_codex_provider.py`` that
clears ``UNSLOTH_CODEX_SPOOF`` before every test so the existing
availability / import gating tests are not polluted when a dev runs
the suite with the flag exported. The spoof-targeted tests still
call ``monkeypatch.setenv(...)`` to flip it back on inside their own
scope. 69/69 pass with and without the env flag.
2026-05-27 14:44:15 +00:00
..
data_recipe Recipe Studio local model selector (#5769) 2026-05-26 02:37:24 -07:00
export fix: repair mlx studio base export save_method (#5727) 2026-05-25 04:04:07 -07:00
inference Studio: spoof-aware Codex availability probe + autouse fixture 2026-05-27 14:44:15 +00:00
training Studio: expose image size setting in training UI (#5743) 2026-05-27 05:01:24 -07:00
__init__.py [Studio] Show non exported models in chat UI (#4892) 2026-04-14 15:03:58 +04:00
tool_healing.py Studio: add remote MCP server support (#5750) 2026-05-27 07:01:11 -07:00