Skip to content

Add WebUI env loading and backend preflight#63

Open
summerview1997 wants to merge 2 commits into
microsoft:mainfrom
summerview1997:codex/webui-env-backend-preflight
Open

Add WebUI env loading and backend preflight#63
summerview1997 wants to merge 2 commits into
microsoft:mainfrom
summerview1997:codex/webui-env-backend-preflight

Conversation

@summerview1997

Copy link
Copy Markdown

Summary

This PR fixes WebUI training launches that silently miss local model endpoint
configuration.

The WebUI previously built the subprocess environment from os.environ plus
.secrets/*.env, but did not load the repository-level .env. A user could
successfully test a Qwen/OpenAI-compatible endpoint from the shell while the
WebUI subprocess fell back to defaults such as http://localhost:8000/v1.

Changes

  • Load PROJECT_ROOT/.env before .secrets/*.env when building the WebUI
    training subprocess environment.
  • Support common export KEY=value syntax in env files.
  • Reuse the same effective environment for preflight validation and subprocess
    launch.
  • Add preflight errors for missing openai_chat endpoints.
  • Add preflight connectivity checks for configured qwen_chat base URLs.
  • Add unit tests for .env loading and backend preflight behavior.

Impact

Users get an immediate actionable error before launch when a backend endpoint is
missing or unreachable, instead of a training run that appears to proceed while
all rollouts fail.

Validation

  • /home/thomas/SkillOpt/.venv/bin/python -m pytest -q tests/test_webui_env_preflight.py
  • /home/thomas/SkillOpt/.venv/bin/python -m pytest -q
  • /home/thomas/SkillOpt/.venv/bin/python -m ruff check skillopt_webui/app.py tests/test_webui_env_preflight.py
  • /home/thomas/SkillOpt/.venv/bin/python -m py_compile skillopt_webui/app.py tests/test_webui_env_preflight.py
  • git diff --check

@summerview1997 summerview1997 changed the title [codex] Add WebUI env loading and backend preflight Add WebUI env loading and backend preflight Jun 16, 2026
@summerview1997 summerview1997 marked this pull request as ready for review June 16, 2026 01:11
@summerview1997

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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.

1 participant