feat: add Atomic Chat as OpenAI-compatible local provider
Register atomic_chat in the provider registry with default base URL http://localhost:1337/v1, schema field, docs, and config tests.
This commit is contained in:
@@ -371,6 +371,28 @@ def test_config_accepts_lm_studio_without_api_key_and_uses_default_localhost_api
|
||||
assert config.get_api_base() == "http://localhost:1234/v1"
|
||||
|
||||
|
||||
def test_config_accepts_atomic_chat_without_api_key_and_uses_default_localhost_api_base():
|
||||
config = Config.model_validate(
|
||||
{
|
||||
"agents": {
|
||||
"defaults": {
|
||||
"provider": "atomic_chat",
|
||||
"model": "local-model",
|
||||
}
|
||||
},
|
||||
"providers": {
|
||||
"atomicChat": {
|
||||
"apiKey": None,
|
||||
}
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
assert config.get_provider_name() == "atomic_chat"
|
||||
assert config.get_api_key() is None
|
||||
assert config.get_api_base() == "http://localhost:1337/v1"
|
||||
|
||||
|
||||
def test_find_by_name_accepts_camel_case_and_hyphen_aliases():
|
||||
assert find_by_name("volcengineCodingPlan") is not None
|
||||
assert find_by_name("volcengineCodingPlan").name == "volcengine_coding_plan"
|
||||
@@ -378,6 +400,8 @@ def test_find_by_name_accepts_camel_case_and_hyphen_aliases():
|
||||
assert find_by_name("github-copilot").name == "github_copilot"
|
||||
assert find_by_name("longcat") is not None
|
||||
assert find_by_name("longcat").name == "longcat"
|
||||
assert find_by_name("atomic-chat") is not None
|
||||
assert find_by_name("atomic-chat").name == "atomic_chat"
|
||||
|
||||
|
||||
def test_config_explicit_longcat_provider_resolves_provider_name():
|
||||
|
||||
Reference in New Issue
Block a user