Add activity-core LLM endpoint support
Some checks failed
CI / test (3.10) (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled

This commit is contained in:
2026-06-07 19:24:45 +02:00
parent 1d9fc107ed
commit 14ba47c129
25 changed files with 2082 additions and 18 deletions

View File

@@ -2,7 +2,8 @@
Factory for creating LLM adapters by provider name.
"""
from typing import Optional, Dict, Any
import os
from typing import Optional, Dict, Any
from llm_connect.adapter import LLMAdapter
from llm_connect.exceptions import LLMConfigurationError
@@ -57,5 +58,10 @@ def create_adapter(
return cls(model=model, api_key=api_key, system_prompt=system_prompt, **kwargs)
elif provider == "claude-code":
return cls(model=model, **kwargs)
else:
return cls(**kwargs)
elif provider == "mock":
mock_response = os.environ.get("LLM_CONNECT_MOCK_RESPONSE")
if mock_response is not None and "mock_response" not in kwargs:
kwargs["mock_response"] = mock_response
return cls(**kwargs)
else:
return cls(**kwargs)