Add LLM profile router with provider configuration
A profile resolves to exactly one provider and model; unmapped profiles, unknown providers and model mismatches fail loudly. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
140014f8bb
commit
65f0714a3b
5 files changed
+247
No files matched your search
@@ -0,0 +1,12 @@
|
||||
"""Interface of one provider behind the router."""
|
||||
|
||||
from typing import Protocol
|
||||
|
||||
from chemenu.adapters.llm.config import ModelTarget
|
||||
from chemenu.ports.llm import LlmRequest, LlmResponse
|
||||
|
||||
|
||||
class Provider(Protocol):
|
||||
"""Calls the model in `target`; keeps no per-call state (used from several threads)."""
|
||||
|
||||
def complete(self, request: LlmRequest, target: ModelTarget) -> LlmResponse: ...
|
||||
Reference in new issue
Block a user