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>
13 lines
393 B
Python
13 lines
393 B
Python
"""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: ...
|