11 Commits

Author SHA1 Message Date
kshitijk4poor
59f9ff8dbc refactor(credits): gate the re-warm on the pricing cache's own failure window
The started_at throttle kept a second clock for a deadline the cache
already holds: a failed fetch caches {} with _pricing_cache_retry_after,
and the two clocks drift by the fetch duration. pricing_fetch_suppressed
reads that state directly, so the tracker drops the ad-hoc Thread
attribute and the private-constant import; the guard test now fails the
way the real fetch does (cached {}) instead of a bare no-op.
2026-09-20 14:02:17 +05:30
Robin Fernandes
a76e491660 feat(nous): unlock subscription-billed models for free-tier accounts
The Nous gateway can bill a catalog row to a subscription the account
holds instead of to credits, and marks such rows with
`billing_mode: "subscription"` on GET /v1/models. A free-tier account
can run them, but the picker locked every row not priced at $0.

Carry the marker into the Nous pricing entry and count it in
`_is_model_free`, which already feeds the tier partition and the
credits-depleted notice. The silent default for a free-tier account
still prefers a genuinely free model.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-20 14:02:17 +05:30
Teknium
7b8c11bcf7 simplify(compat): models — drop 52 re-exports from hermes_cli.models, repoint 16 callers + 41 test files 2026-09-03 13:48:49 -07:00
Teknium
b8f99bfc43 review-fix(seams): late-bind facade-patched names in models_pricing, hermes_state_repair, approval_detection
Reviewer P2 (kshitijk4poor): tests patch hermes_cli.models.get_cached_nous_inference_base_url
but models_pricing.pricing_cache_scope read its own module global, so the patch never reached
the call and the test passed on the default-endpoint fallback. Same seam-erosion class audited
across /tmp/rf/patch_traps.json (777 candidates) with an AST reachability check + a per-test
call-count probe (facade vs defining module) against BASE 63279301bcb; three seams actually
bypassed their patch on HEAD but not on BASE:

- hermes_cli.models.get_cached_nous_inference_base_url  <- models_pricing.pricing_cache_scope
- hermes_state._connect_repair_durable                  <- hermes_state_repair._open_exclusive/_repair_conn/_db_opens_cleanly
- tools.approval._command_detection_variants            <- approval_detection.detect_{dangerous,hardline}_command

Each now looks the name up through its facade at call time (the pattern hermes_state_repair
already used in live_writer_holds_db), restoring BASE's patchability.
2026-09-03 09:43:13 -07:00
Teknium
0071ba9965 Merge origin/main (561b053f79) into simp/forwardport: forward-port 220 main commits into the simplified tree 2026-09-03 03:31:03 -07:00
Teknium
c64a1fbd6c refactor(hermes_cli): repack literal tables, one-line trivial branches, share _drop_authorization 2026-09-02 21:57:37 -07:00
Teknium
b30c4f1667 refactor(hermes_cli): fold match verdicts into _Match.verdict, ordered validation ladder table, tighter local/pricing bodies and docstrings 2026-09-02 21:34:59 -07:00
Teknium
07904249a3 refactor(hermes_cli): dispatch-table pricing fetchers, shared price parsing, slot accessors on _CapsSource 2026-09-02 21:12:47 -07:00
Teknium
5c9580c696 refactor(models): dedupe ollama probe failure/ollama-config lookups, pricing fetch/entry helpers; logger parity in models_local 2026-09-02 16:35:42 -07:00
Teknium
64cf496ca5 refactor(models): collapse deepinfra/custom-cache/provider-list helpers; module docstrings 2026-09-02 16:24:19 -07:00
Teknium
ade1c5a746 refactor(models): extract models_local + models_pricing; unify json disk-cache I/O, portal recommendation union, live-catalog index, copilot token exchange, probe/cache-entry builders 2026-09-02 16:06:33 -07:00