LLM providers implement the LLMAdapter protocol:
class LLMAdapter(Protocol):
provider: str
def complete(self, request: LLMRequest) -> LLMResponse: ...- Add a
ProviderConfigentry toPROVIDER_CONFIGSinteaagent/llm.py. - Implement an adapter class or reuse
OpenAICompatibleAdapter. - Validate response shape strictly. Missing content must raise
LLMResponseFormatError, not return an empty string. - Classify provider-side blocks and errors as
LLMProviderError. - Use
LLMRetryConfigfor transient HTTP failures. - Add unit tests for request payload, headers, malformed responses, and provider errors.
- Run
teaagent model conformance --provider <provider>before using the provider in agent runs.
- Respect
LLMRequest.systemwhen the provider supports system prompts. - Respect
max_tokensandtemperaturewhere supported. - Populate
input_tokensandoutput_tokenswhen the provider reports usage. - Preserve the raw provider response in
LLMResponse.rawfor debugging.
smoke: provider returns non-empty content.contract: exact content, system-prompt adherence, and token-budget reporting.STREAMING,STRUCTURED_OUTPUT,TOOL_CALLING,SAFETY, andLATENCYtiers are implemented inteaagent/llm_conformanceand exercised byteaagent model conformanceplus unit tests undertests/test_conformance_tiers.py,tests/test_tool_calling_conformance.py, andtests/test_latency_tier.py.