llm_catalog.go (package eai)
Source: sdks/go/llm_catalog.go. Back to the Go SDK reference index.
This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.
Class ProvidersService
LLM and Model Gateway. Model providers, the model registry, routing rules and the Model Gateway: the only path agents and applications use to call models.
ProvidersService.DiscoverModels
DiscoverModels(ctx context.Context, id string, opts ...CallOption) (json.RawMessage, error)
Discover the models of a provider. Models the configured provider really serves, from its own listing API with the stored credentials and through the outbound guard (never a made up list). Each candidate carries what the provider returns (context window, maximum output, modalities, prices) completed with platform hints, a suggested registry id and category, and whether it is already registered; up to 1000 candidates. Providers without a listing API answer manual_only. A disabled provider answers 409 provider_disabled. Audited (provider.discover). Requires tenant_admin, platform_admin or ai_platform_engineer.
Route: /v1/providers/{pid}/models/discover (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
ctx | context.Context | yes | Context of the call: cancellation and deadline. | |
id | string | yes | Identifier (UUID) of the provider. | |
opts | ...CallOption | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Discover the models of a provider". The error is a typed error of the SDK, nil on success.
Raises: error, the typed errors of the transport (Errors).