Skip to content

fix(tools-config): stop reconfigure flow clobbering image_gen.use_gateway on managed FAL rows - #87562

Merged
teknium1 merged 1 commit into
mainfrom
fix/imggen-managed-use-gateway-clobber
Aug 16, 2026
Merged

teknium1 merged 1 commit into
mainfrom
fix/imggen-managed-use-gateway-clobber

Conversation

@teknium1

Copy link
Copy Markdown
Collaborator

Summary

Nous-managed FAL image-gen picks now survive the model-picker step in the reconfigure flow — previously _reconfigure_provider clobbered image_gen.use_gateway back to False right after the managed branch wrote True, silently routing every generation to the user's personal FAL_KEY instead of the Nous subscription.

Root cause: the "Nous Subscription" image_gen row carries imagegen_backend: "fal", and the legacy-backend model-pick step wrote use_gateway = False unconditionally at two sites. Same class as fe63353, which fixed the plugin-provider selector but missed the reconfigure flow.

Changes

  • hermes_cli/tools_config.py: both _reconfigure_provider sites now write bool(managed_feature) instead of hardcoded False (matches the existing correct site in _configure_provider)
  • tests/hermes_cli/test_imagegen_managed_gateway.py: 2 regression tests driven through the real TOOL_CATEGORIES managed row + a direct-key row

Validation

Before After
Managed pick + model reconfigure use_gateway: false (personal key billed, drained to lockout) use_gateway: true (subscription billed)
Direct-key FAL reconfigure use_gateway: false use_gateway: false (unchanged)
New tests vs sabotaged (old) code fail as expected
tests/hermes_cli/test_imagegen_managed_gateway.py + test_tools_config.py 53/53 pass

Live-verified: repaired config generates through the gateway (Nous-billed) successfully.

Infographic

Managed gateway flag clobber fix

…eway on managed FAL rows

The Nous Subscription image_gen row carries imagegen_backend="fal", so
_reconfigure_provider's post-model-picker step ran

    img_cfg["use_gateway"] = False

unconditionally at two sites, immediately after the managed branch had
written use_gateway=True. A user who picked Nous Subscription and then
re-entered `hermes tools` to change the model was silently flipped onto
their personal FAL_KEY.

Same bug class as fe63353, which fixed the plugin-provider selector
but missed these two legacy-backend sites in the reconfigure flow. Both
now write bool(managed_feature), matching the existing correct site in
_configure_provider.

Adds regression tests driven through the real TOOL_CATEGORIES managed
row; sabotage-verified (tests fail with the old behavior restored).
@github-actions

github-actions Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on 1e59dbd — fix(tools-config): stop reconfigure flow clobbering image_ge

⚠️ Warnings

OSV vulnerability scan · View job

5 known vulnerabilities found in pinned dependencies.

How to fix:

Review the findings in the Security tab. Update the affected dependencies if a patched version is available.


debug info

CI timings

CI timings · View report · View job

Wall time 22m40s vs 28m15s (-19.8%). 19 job(s) slower, 3 faster, 2 unchanged.

  • Python tests / Run tests slice 2/12: +45.0s
  • Python tests / Run tests slice 3/12: +30.0s
  • Python lints / Windows footguns (blocking): +23.0s
  • Python tests / Run tests slice 5/12: +20.0s
  • Python tests / Run tests slice 1/12: +18.0s

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard area/config Config system, migrations, profiles area/usage-cost Token accounting, usage reporting, billing, cost tracking area/billing Account usage, credit usage, billing (cross-cutting) labels Aug 16, 2026
@teknium1
teknium1 merged commit 6c745e8 into main Aug 16, 2026
48 checks passed
@teknium1
teknium1 deleted the fix/imggen-managed-use-gateway-clobber branch August 16, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/billing Account usage, credit usage, billing (cross-cutting) area/config Config system, migrations, profiles area/usage-cost Token accounting, usage reporting, billing, cost tracking comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants