nodus.llm
View MarkdownOpenAI- and Anthropic-compatible inference (resources.md §4.5, §4.6, ADR-049, ADR-100).
nodus.llm.openai() and nodus.llm.anthropic() return the official clients pointed at the Nodus inference data
plane with your key, so every stock SDK feature works. Inside a Nodus container they use OPENAI_BASE_URL and
ANTHROPIC_BASE_URL, the loopback proxy that adds the attempt’s token and bills the owning run; name an endpoint
there with model="endpoint/<name>". Requires the
openai or anthropic extra: pip install "nodus-compute[openai]".
InferenceEndpoint
Section titled “InferenceEndpoint”class InferenceEndpoint(obj: Obj) -> NoneA named access policy (limits, allowed keys, cost cap) over a catalog Model, with its own base URL.
InferenceEndpoint.anthropic
Section titled “InferenceEndpoint.anthropic”anthropic(**kwargs: Any) -> AnyInferenceEndpoint.base_url
Section titled “InferenceEndpoint.base_url”Type: str | None
InferenceEndpoint.create
Section titled “InferenceEndpoint.create”create(name: str, model: str, *, rpm: int | None = None, tpm: int | None = None, max_concurrent: int | None = None, allowed_keys: list[str] | None = None, max_cost: Any = None, project: str | None = None) -> _InferenceEndpointInferenceEndpoint.from_name
Section titled “InferenceEndpoint.from_name”from_name(name: str, project: str | None = None) -> _InferenceEndpointInferenceEndpoint.name
Section titled “InferenceEndpoint.name”Type: str
InferenceEndpoint.openai
Section titled “InferenceEndpoint.openai”openai(**kwargs: Any) -> AnyInferenceEndpoint.usage
Section titled “InferenceEndpoint.usage”usage() -> ViewRequests, errors, tokens and cost over the last 24 hours (refreshed every minute).
anthropic
Section titled “anthropic”anthropic(endpoint: str | None = None, project: str | None = None, **kwargs: Any) -> AnyAn anthropic.Anthropic client for /v1/messages on the inference data plane.
async_anthropic
Section titled “async_anthropic”async_anthropic(endpoint: str | None = None, project: str | None = None, **kwargs: Any) -> Anyasync_openai
Section titled “async_openai”async_openai(endpoint: str | None = None, project: str | None = None, **kwargs: Any) -> Anyopenai
Section titled “openai”openai(endpoint: str | None = None, project: str | None = None, **kwargs: Any) -> AnyAn openai.OpenAI client for the inference data plane (or a named InferenceEndpoint).