Updated
On this page
Provider protocol every LLM backend implements (build_request, parse_response, parse_stream, extract_usage, tool-result formatting) plus the RetryPolicy backoff config dataclass.
#transport.src.orxtra.transport._provider
#transport.src.orxtra.transport._provider
#RetryPolicy
| Field | Type | Default |
|---|---|---|
max_retries | int | |
backoff_base_seconds | float | |
backoff_max_seconds | float | |
jitter | bool |
#Provider
#build_request
python
def build_request(self, messages: list[dict[str, Any]], tools: list[dict[str, Any]], system: str, model: str) -> dict[str, Any]#parse_response
python
def parse_response(self, response: dict[str, Any]) -> list[ContentBlock]#parse_stream
python
def parse_stream(self, byte_stream: AsyncIterator[bytes]) -> AsyncIterator[TransportEvent]#extract_usage
python
def extract_usage(self, response: dict[str, Any]) -> Usage#format_tool_result
python
def format_tool_result(self, tool_use_id: str, content: str, is_error: bool) -> dict[str, Any]#wrap_tool_results
python
def wrap_tool_results(self, results: list[dict[str, Any]]) -> list[dict[str, Any]]#format_assistant_message
python
def format_assistant_message(self, blocks: list[ContentBlock]) -> dict[str, Any]