Skip to content

fix(tests): stabilize xai env and provider parity#26565

Closed
aqilaziz wants to merge 3 commits into
NousResearch:mainfrom
aqilaziz:fix/xai-http-live-env-lookup
Closed

fix(tests): stabilize xai env and provider parity#26565
aqilaziz wants to merge 3 commits into
NousResearch:mainfrom
aqilaziz:fix/xai-http-live-env-lookup

Conversation

@aqilaziz

@aqilaziz aqilaziz commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • resolve hermes_cli.config.get_env_value inside tools.xai_http.get_env_value() at call time so full-suite monkeypatching cannot freeze a stale helper
  • set explicit models in Nous Portal provider parity tests to avoid empty-model context-window failures
  • define the Discord mock Forbidden exception as a real Exception subclass for e2e backfill error handling

Tests

  • python -m pytest -o addopts='' tests\tools\test_transcription_dotenv_fallback.py tests\run_agent\test_provider_parity.py::TestDeveloperRoleSwap::test_developer_role_via_nous_portal tests\run_agent\test_provider_parity.py::TestBuildApiKwargsNousPortal tests\e2e\test_discord_adapter.py -q --tb=short
  • python -m ruff check tools\xai_http.py tests\tools\test_transcription_dotenv_fallback.py tests\run_agent\test_provider_parity.py tests\e2e\conftest.py
  • python -m py_compile tools\xai_http.py tests\tools\test_transcription_dotenv_fallback.py tests\run_agent\test_provider_parity.py tests\e2e\conftest.py

@aqilaziz aqilaziz force-pushed the fix/xai-http-live-env-lookup branch from 3ed9eae to bd62153 Compare May 15, 2026 20:27
@aqilaziz aqilaziz changed the title fix(xai): resolve env helper at call time fix(tests): stabilize xai env and provider parity May 15, 2026
@alt-glitch alt-glitch added type/test Test coverage or test infrastructure provider/xai xAI (Grok) comp/tools Tool registry, model_tools, toolsets P3 Low — cosmetic, nice to have labels May 15, 2026
@aqilaziz

Copy link
Copy Markdown
Contributor Author

All checks are green here. This appears to be the shared blocker behind the current Tests failures on #26420, #26406, and #26407: both failing cases are in tests/tools/test_transcription_dotenv_fallback.py (test_explicit_xai_sees_dotenv and test_xai_key_only_in_dotenv_before_fix). Once this lands, those PRs should be rerun/rebased rather than patched in their unrelated scopes.

@teknium1

Copy link
Copy Markdown
Contributor

Merged via #27562 with your authorship preserved via rebase-merge. Commit bc7c608d5 is on main. I skipped the intermediate Merge remote-tracking branch 'upstream/main' commit on your branch and cherry-picked just the two substantive commits (xai_http defer-import + gateway path-probe stat-guard). Thanks for the fix — this also resolves the substance of #26640 (will close that one next).

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

Labels

comp/tools Tool registry, model_tools, toolsets P3 Low — cosmetic, nice to have provider/xai xAI (Grok) type/test Test coverage or test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants