Skip to content

fix(interface): drop dead reasoning-effort branches, fix stale model name and STRIX_IMAGE casing#595

Open
Rome-1 wants to merge 1 commit into
usestrix:mainfrom
Rome-1:fix/interface-message-cleanups
Open

fix(interface): drop dead reasoning-effort branches, fix stale model name and STRIX_IMAGE casing#595
Rome-1 wants to merge 1 commit into
usestrix:mainfrom
Rome-1:fix/interface-message-cleanups

Conversation

@Rome-1

@Rome-1 Rome-1 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Three small interface-message correctness fixes in strix/interface/:

  • validate_environment() carried two elif var == "STRIX_REASONING_EFFORT" branches, but only LLM_API_KEY, LLM_API_BASE, and PERPLEXITY_API_KEY are ever appended to missing_optional_vars, so both branches were unreachable dead code — removed.
  • The STRIX_LLM help text and the warm-up warning recommended anthropic/claude-opus-4-7, a model that appears nowhere in the README or docs; switched to anthropic/claude-sonnet-4-6, the canonical recommendation used throughout README.md and docs/.
  • _resolve_sandbox_image() reported the missing setting as lowercase strix_image, while the actual env var / Pydantic alias is STRIX_IMAGE; corrected the casing and now points users at both export STRIX_IMAGE=<image> and ~/.strix/cli-config.json.

Testing

  • pytest tests/test_interface_messages.py — 3 passed. Each test asserts one of the fixes; all three fail against current main (verified by reverting the source in-tree), so they are meaningful regression guards.
  • ruff check (including pyupgrade UP rules) and bandit are clean on the changed files.
  • Note: the repo's pinned pre-commit mypy hook crashes with an internal error on the bundled openai SDK on main as well, so it was not used as a gate here.
… and STRIX_IMAGE casing

Drop the two unreachable STRIX_REASONING_EFFORT branches in
validate_environment (the var is never added to missing_optional_vars),
replace the stale anthropic/claude-opus-4-7 example with the canonical
anthropic/claude-sonnet-4-6, and correct the env-var casing in the
_resolve_sandbox_image error message to STRIX_IMAGE.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Three targeted correctness fixes to user-facing interface messages in strix/interface/: dead unreachable STRIX_REASONING_EFFORT branches removed, stale model name updated, and error message casing corrected.

  • Dead code removal: Two elif var == "STRIX_REASONING_EFFORT" branches in validate_environment() could never execute because STRIX_REASONING_EFFORT is never appended to missing_optional_vars; they are cleanly dropped.
  • Model name update: Help text and warm-up warning that cited anthropic/claude-opus-4-7 are updated to anthropic/claude-sonnet-4-6, aligning with the canonical recommendation in README and docs.
  • Error message casing fix: _resolve_sandbox_image() now reports STRIX_IMAGE (uppercase, matching the actual env var / Pydantic alias) and includes an export STRIX_IMAGE=<image> example alongside the config file path.

Confidence Score: 5/5

All three changes are cosmetic message fixes with no effect on runtime logic or data flow; safe to merge.

The diff touches only user-facing string literals and removes provably dead elif branches. The accompanying tests are meaningful — they fail on main before the fix — and the monkeypatching pattern in the sandbox-image test correctly targets the name in the consuming module.

No files require special attention.

Important Files Changed

Filename Overview
strix/interface/main.py Removes two unreachable STRIX_REASONING_EFFORT branches and corrects the model name in user-facing messages from claude-opus-4-7 to claude-sonnet-4-6; also adds a blank line after the inline import math for style.
strix/interface/cli.py Fixes the _resolve_sandbox_image error message: corrects env var casing to STRIX_IMAGE and adds export STRIX_IMAGE= alongside the config file path.
tests/test_interface_messages.py New test file with three focused tests covering each of the three fixes; uses inspect.getsource() for the dead-code and model-name assertions, and monkeypatching for the error-message casing test.

Reviews (1): Last reviewed commit: "fix(interface): remove dead reasoning-ef..." | Re-trigger Greptile

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

Labels

None yet

1 participant