7 Commits

Author SHA1 Message Date
teknium1 130284fdcd fix(providers): declare catalog-only aliases on their plugin profiles
Same class as minimax-portal: aliyun, deep-seek, nim/build-nvidia/nemotron
and vertexai resolve in hermes_cli's alias tables but not in
providers.get_provider_profile(), so a profile lookup keyed on the alias
returned None and lost the profile's wire mode/extra_body/headers. qwen is
left out: the catalog maps it to alibaba while the qwen-oauth plugin already
claims it, a pre-existing disagreement outside this fix.
2026-09-13 12:52:43 -07:00
Teknium 40722b322c refactor(model-providers): pack keyword-only profile constructors (comments and multi-line values keep their lines) 2026-09-02 21:45:13 -07:00
Teknium 9338e21093 refactor(model-providers): compact reasoning-translation profiles (opencode, kimi, zai, minimax, nous, qwen, custom, upstage, nebius, meta-ai, deepseek, copilot, deepinfra, vertex, gemini), fold catalog tuples 2026-09-02 21:36:03 -07:00
Teknium 313b244e8f refactor(plugins/model-providers): reuse agent.reasoning_effort clamps, per-model dict tables, compact profiles 2026-09-02 13:30:28 -07:00
Riccardo Roveri b95f3a5202 fix(providers): use copy-on-write instead of deepcopy in NVIDIA prepare_messages
Addresses the unresolved review comment on #30674 — avoid deep-copying
the whole conversation (including large tool outputs and attachments) to
sanitize two top-level keys on a handful of tool-role messages.

Switches to a shallow outer-list copy + shallow per-message dict copy,
applied only to messages that actually carry name/tool_name. Matches the
copy-on-write pattern already used by the shared sanitizer in
agent/transports/chat_completions.py and by QwenProfile.prepare_messages().
The needs_sanitize early-return path is preserved unchanged so the
existing identity check (prepare_messages returns the original list object
when nothing needs sanitizing) continues to hold.
2026-08-19 18:14:03 +02:00
pmos69 fc05cfb58e fix nvidia tool message schema 2026-08-19 18:10:53 +02:00
Teknium 9022804d78 feat(providers): make all 33 providers pluggable under plugins/model-providers/
Every provider profile is now a self-contained plugin under
plugins/model-providers/<name>/, mirroring the plugins/platforms/
pattern established for IRC and Teams. The ProviderProfile ABC
stays in providers/; the per-provider profile data moves out.

- plugins/model-providers/<name>/__init__.py calls register_provider()
- plugins/model-providers/<name>/plugin.yaml declares kind: model-provider
- providers/__init__.py._discover_providers() lazily scans bundled plugins
  then $HERMES_HOME/plugins/model-providers/<name>/ (user override path)
- User plugins with the same name override bundled ones (last-writer-wins
  in register_provider)
- Legacy providers/<name>.py layout still supported for back-compat with
  out-of-tree editable installs
- Hermes PluginManager: new kind=model-provider; skipped like memory
  plugins (providers/ discovery owns them); standalone plugins with
  register_provider+ProviderProfile in their __init__.py auto-coerce to
  this kind (same heuristic as memory providers)
- skip_names extended to include 'model-providers' so the general
  PluginManager doesn't double-scan the category
- 4 new tests in tests/providers/test_plugin_discovery.py covering
  bundled discovery, user override, and general-loader isolation
- Docs updated: website/docs/developer-guide/adding-providers.md,
  provider-runtime.md, providers/README.md, plugins/model-providers/README.md

No API break: auth.py / config.py / doctor.py / models.py / runtime_provider.py /
model_metadata.py / auxiliary_client.py / chat_completions.py / run_agent.py
all still consume providers via get_provider_profile() / list_providers() —
they just now see plugin-discovered entries instead of pkgutil-iterated ones.

Third parties can now drop a single directory into
~/.hermes/plugins/model-providers/<name>/ to add or override an inference
provider without touching the repo.
2026-05-05 13:40:01 -07:00