mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-04-02 09:22:36 +00:00
- Remove litellm dependency entirely (supply chain risk mitigation) - Add AnthropicProvider (native SDK) and OpenAICompatProvider (unified) - Merge CustomProvider into OpenAICompatProvider, delete custom_provider.py - Add ProviderSpec.backend field for declarative provider routing - Remove _resolve_model, find_gateway, find_by_model (dead heuristics) - Pass resolved spec directly into provider — zero internal lookups - Stub out litellm-dependent model database (cli/models.py) - Add anthropic>=0.45.0 to dependencies, remove litellm - 593 tests passed, net -1034 lines
21 lines
645 B
Python
21 lines
645 B
Python
"""Tests for the Mistral provider registration."""
|
|
|
|
from nanobot.config.schema import ProvidersConfig
|
|
from nanobot.providers.registry import PROVIDERS
|
|
|
|
|
|
def test_mistral_config_field_exists():
|
|
"""ProvidersConfig should have a mistral field."""
|
|
config = ProvidersConfig()
|
|
assert hasattr(config, "mistral")
|
|
|
|
|
|
def test_mistral_provider_in_registry():
|
|
"""Mistral should be registered in the provider registry."""
|
|
specs = {s.name: s for s in PROVIDERS}
|
|
assert "mistral" in specs
|
|
|
|
mistral = specs["mistral"]
|
|
assert mistral.env_key == "MISTRAL_API_KEY"
|
|
assert mistral.default_api_base == "https://api.mistral.ai/v1"
|