Skip to content

Conversation

@lorenss-m
Copy link
Contributor

@lorenss-m lorenss-m commented Jan 9, 2026

Note

Agents (Claude/Gemini/OpenAI)

  • Default to HUD gateway (HUD_API_KEY) via build_gateway_client, fallback to provider keys; clearer "No API key found" errors
  • Tests updated to reflect new error message

Environment

  • Add _routing_built flag; build routing in _build_routing() and on-demand in _env_list_tools(); reset flag on exit

Scenarios

  • Clearer errors: distinguish missing scenarios vs existing scenarios that failed during setup
  • More robust prompt arg deserialization using TypeAdapter.validate_json with JSON fallbacks; keeps strings when appropriate

Versioning/Docs

  • Bump version to 0.5.4 in hud/version.py, pyproject.toml, tests, and docs/docs.json

Written by Cursor Bugbot for commit 271a140. This will update automatically on new commits. Configure here.

@lorenss-m lorenss-m merged commit 13a87fb into main Jan 9, 2026
9 checks passed

# Check if the prompt exists - if so, the error is something else
original_error = str(e)
if prompt_id in scenario_prompts:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uninitialized variable accessed after failed prompts lookup

High Severity

The variable scenario_prompts is only defined inside the inner try block (line 195), but the code at line 204 accesses it unconditionally. If list_prompts() raises an exception, the inner except block only assigns available but not scenario_prompts. This causes a NameError when checking if prompt_id in scenario_prompts, crashing the error handling path with a confusing exception instead of the intended helpful error message.

Additional Locations (1)

Fix in Cursor Fix in Web

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.

3 participants