mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-28 06:51:16 +08:00
Introduces providers/ as the single source of truth for every inference
provider. All 29 providers declared with correct data cross-checked against
auth.py, runtime_provider.py and auxiliary_client.py.
Providers covered:
chat_completions: openrouter, nous, kimi-coding, kimi-coding-cn, qwen-oauth,
nvidia, deepseek, zai, stepfun, arcee, huggingface, xiaomi, ollama-cloud,
kilocode, alibaba, opencode-zen, opencode-go, custom, vercel (ai-gateway),
copilot, gemini, google-gemini-cli
codex_responses: xai, openai-codex
anthropic_messages: anthropic, minimax, minimax-cn
bedrock_converse: bedrock
chat_completions (ACP subprocess): copilot-acp
Key additions vs prior commit:
- Cross-checked ALL env_vars against auth.py (fixed copilot, zai, kimi-coding,
arcee, alibaba, ollama-cloud)
- Cross-checked ALL aliases against auth.py _PROVIDER_ALIASES (added 21 missing:
kimi-cn, moonshot-cn, kimi-for-coding, claude-code, github, github-model,
qwen-cli, huggingface-hub, x.ai, lmstudio/vllm/llamacpp variants, go,
opencode-go-sub, kilo-gateway)
- Fixed auth_type mismatches (bedrock: aws_sdk, copilot: copilot)
- Fixed copilot-acp api_mode to match runtime_provider.py (chat_completions)
- Added 4 missing default_aux_model values (stepfun, minimax, minimax-cn, ollama-cloud)
- fetch_models() on every profile (default hits base_url/models with Bearer auth)
- models_url field for non-standard catalog URLs (OpenRouter public endpoint)
- Transport registry _discovered guard (fixes xdist partial-registry poisoning)
- Copilot ACP client relocated agent/ -> acp_adapter/
- run_agent.py: _PROFILE_ACTIVE_PROVIDERS module-level, dead is_nvidia_nim removed
- providers/README.md contributor guide
Closes part of #14418. Remaining activation in #14515.
30 lines
783 B
Python
30 lines
783 B
Python
"""AWS Bedrock provider profile."""
|
|
|
|
from providers import register_provider
|
|
from providers.base import ProviderProfile
|
|
|
|
|
|
class BedrockProfile(ProviderProfile):
|
|
"""AWS Bedrock — no REST /v1/models endpoint; uses AWS SDK."""
|
|
|
|
def fetch_models(
|
|
self,
|
|
*,
|
|
api_key: str | None = None,
|
|
timeout: float = 8.0,
|
|
) -> list[str] | None:
|
|
"""Bedrock model listing requires AWS SDK, not a REST call."""
|
|
return None
|
|
|
|
|
|
bedrock = BedrockProfile(
|
|
name="bedrock",
|
|
aliases=("aws", "aws-bedrock", "amazon-bedrock", "amazon"),
|
|
api_mode="bedrock_converse",
|
|
env_vars=(), # AWS SDK credentials — not env vars
|
|
base_url="https://bedrock-runtime.us-east-1.amazonaws.com",
|
|
auth_type="aws_sdk",
|
|
)
|
|
|
|
register_provider(bedrock)
|