8 Commits

Author SHA1 Message Date
teknium1
13fe9c7171 feat(providers): external-process provider support for standalone model-provider plugins (from #105863)
The provider-agnostic half of PR #105863, so a CLI-driven subscription provider can ship as a
standalone `kind: model-provider` plugin instead of a bundled one:

- ProviderProfile: `native_reasoning_details_type`, `model_aliases`, `get_model_context_length`,
  `get_usage_cost`, `setup_status`, `discover_models` hooks (all default None / no-op).
- Chat Completions transport: provider-native `reasoning_details` carriers follow only their
  declaring profile; standard records still replay on OpenRouter-style routes, strict routes
  drop the field wholesale (#70233). Relay/stream accumulate `delta.reasoning_details` verbatim.
- `hermes model`: the generic plugin flow gates an external-process row on the CLI's own login
  status (inline `login_command` on a TTY), offers `discover_models()` rows with per-row notes,
  and never writes config when the executable is missing.
- `/model` and the pickers: process providers list their live catalog merged with the pinned
  one, declared aliases/ids resolve inside the provider, and validation accepts a listed id
  without probing `process://`.
- Delegation keeps the selected external-process provider and protocol for the child.
- Model metadata / usage pricing consult the profile's bound and cost hooks first.
- Desktop: `[1m]` renders as a "1M" tag and hyphenated Anthropic versions read "Haiku 4.5".

The bespoke `_model_flow_external_process` and hard-coded `hermes_cli/main.py` paths from the
PR were dropped in favour of main's `_model_flow_plugin_provider`.

Co-authored-by: unsupportedpastels <unsupportedpastels@users.noreply.github.com>
2026-09-20 14:29:39 -07:00
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
16579014cb refactor(hermes_cli): group C auth modules — compact WHY-preserving comments and docstrings 2026-09-02 21:59:38 -07:00
Teknium
105c4413d3 refactor(hermes_cli): auth_model_picker — reuse custom-entry helper in fallback; single-expr header lines 2026-09-02 21:55:44 -07:00
Teknium
f8e71375a7 refactor(hermes_cli): spotify — inline single-use exchange/scope helpers; minimax — simpler bounded body reader; drop post-import blanks 2026-09-02 21:18:56 -07:00
Teknium
0e3203618b refactor(hermes_cli): group C — AST-neutral layout compaction (hug/pack/join, verified ast.dump-equal) 2026-09-02 20:56:23 -07:00
Teknium
323c0d88eb refactor(hermes_cli): auth_model_picker — shared labels, dedupe custom-entry path, packed layout 2026-09-02 20:27:47 -07:00
Teknium
d32014a4a6 refactor(auth): split OAuth-grant hygiene, device-flow helpers, model picker and Kimi/Z.AI detection into modules 2026-09-02 15:48:08 -07:00