Provider Contract¶
Truthound AI standardizes providers behind a small structured-output contract.
Core Types¶
ProviderConfigStructuredProviderRequestStructuredProviderResponseAIProvider
The current default provider family is OpenAI, but the dashboard and other consumers are intentionally coupled to the public Truthound AI contract rather than to the OpenAI SDK directly.
Resolution Rules¶
Provider resolution follows a narrow contract:
- explicit provider instance
- explicit provider config
- default OpenAI-backed provider
Model resolution follows:
- explicit model argument
- provider config model name
- environment fallback
If no model can be resolved, the request fails early as a configuration error.
Error Taxonomy¶
Provider failures stay typed so downstream callers can distinguish them:
ProviderConfigurationErrorProviderTransportErrorProviderResponseError
This matters for dashboards and CLIs because UI behavior should depend on contracted failure classes, not provider-specific exception strings.