cloud
cloud
¶
Cloud inference engine.
OpenAI, Anthropic, Google, MiniMax, and DeepSeek API backends.
Classes¶
CloudEngine
¶
Bases: InferenceEngine
Cloud inference via OpenAI, Anthropic, Google, MiniMax, and DeepSeek SDKs.
Source code in src/openjarvis/engine/cloud.py
Functions¶
stream_full
async
¶
stream_full(messages: Sequence[Message], *, model: str, temperature: float = 0.7, max_tokens: int = 1024, **kwargs: Any) -> AsyncIterator[StreamChunk]
Yield StreamChunks with content, tool_calls, and finish_reason.
Source code in src/openjarvis/engine/cloud.py
can_serve
¶
Return True only if the provider client for model exists.
health() is True whenever any provider client is configured,
but a request for, say, a gpt-* model still needs the OpenAI
client specifically. Without this check the cloud engine gets picked
as a fallback (when the local engine is down) for a model it can't
serve, then dies at call time with "
Source code in src/openjarvis/engine/cloud.py
Functions¶
estimate_cost
¶
Estimate USD cost based on the hardcoded pricing table.