Directories
¶
| Path | Synopsis |
|---|---|
|
adapters
|
|
|
anthropic
Package anthropic translates the Anthropic Messages wire shape to and from the canonical v1 protocol.
|
Package anthropic translates the Anthropic Messages wire shape to and from the canonical v1 protocol. |
|
gemini
Package gemini implements v1.Translator for the Google Gemini generateContent / streamGenerateContent wire shape (v1beta).
|
Package gemini implements v1.Translator for the Google Gemini generateContent / streamGenerateContent wire shape (v1beta). |
|
openai
Package openai translates the OpenAI Chat Completions and Responses wire shapes to and from the canonical v1 protocol.
|
Package openai translates the OpenAI Chat Completions and Responses wire shapes to and from the canonical v1 protocol. |
|
Package catalog is the pure SDK view of the public relay catalog: embedded host/bindings/pricing data plus model-ref resolution and per-binding cost.
|
Package catalog is the pure SDK view of the public relay catalog: embedded host/bindings/pricing data plus model-ref resolution and per-binding cost. |
|
Package catalogsource yields a full *catalog.IndexedCatalog from one of four places: the catalog embedded in this SDK version, a local catalog file, a relay-catalog release asset fetched by tag and cached on disk (Release), or the newest release of this SDK's schema channel, refreshed periodically with labelled fallbacks (Latest).
|
Package catalogsource yields a full *catalog.IndexedCatalog from one of four places: the catalog embedded in this SDK version, a local catalog file, a relay-catalog release asset fetched by tag and cached on disk (Release), or the newest release of this SDK's schema channel, refreshed periodically with labelled fallbacks (Latest). |
|
Package client is a thin Go client that speaks the relay canonical shape (sdk/v1).
|
Package client is a thin Go client that speaks the relay canonical shape (sdk/v1). |
|
Package host is the public, read-only discovery view of a serving endpoint: its base URL, display metadata, and the slugs of the models it serves.
|
Package host is the public, read-only discovery view of a serving endpoint: its base URL, display metadata, and the slugs of the models it serves. |
|
internal
|
|
|
atomicfile
Package atomicfile replaces a file in one rename so a concurrent reader sees either the old bytes or the new ones, never a partial write.
|
Package atomicfile replaces a file in one rename so a concurrent reader sees either the old bytes or the new ones, never a partial write. |
|
catalogpick
Package catalogpick holds the rule for which host's binding stands for a model when the caller names no host, shared by modeldir (the rate sheet a file carries) and modelroutes (routes that leave host selection to a relay).
|
Package catalogpick holds the rule for which host's binding stands for a model when the caller names no host, shared by modeldir (the rate sheet a file carries) and modelroutes (routes that leave host selection to a relay). |
|
dataurl
Package dataurl reads RFC 2397 data: URLs for the vendor adapters whose wire takes inline media only as a media type plus base64 data.
|
Package dataurl reads RFC 2397 data: URLs for the vendor adapters whose wire takes inline media only as a media type plus base64 data. |
|
fidelity
Package fidelity is test support for vendor adapters: it builds a canonical request with every request-level field set to a distinctive value, and checks a serialized body either carries each field or names it in an explicit drop list.
|
Package fidelity is test support for vendor adapters: it builds a canonical request with every request-level field set to a distinctive value, and checks a serialized body either carries each field or names it in an explicit drop list. |
|
graph
Package graph is the SDK's internal catalog-discovery graph: a denormalized, cross-linked view of the embedded catalog (models, the hosts that serve them, and the providers that author them) built once from sdk/catalog.
|
Package graph is the SDK's internal catalog-discovery graph: a denormalized, cross-linked view of the embedded catalog (models, the hosts that serve them, and the providers that author them) built once from sdk/catalog. |
|
jsonscan
Package jsonscan walks the members of a JSON object and the elements of a JSON array in raw bytes without decoding them, for the vendor adapters' per-frame checks on stream hot paths.
|
Package jsonscan walks the members of a JSON object and the elements of a JSON array in raw bytes without decoding them, for the vendor adapters' per-frame checks on stream hot paths. |
|
sse
Package sse splits server-sent-event bytes into events per the WHATWG event-stream rules, for the vendor adapters' to-canonical stream parsers and usage walkers: events end at a blank line, an event's data is its data lines joined with "\n", lines end in LF, CRLF or CR, and comments and unknown fields are ignored.
|
Package sse splits server-sent-event bytes into events per the WHATWG event-stream rules, for the vendor adapters' to-canonical stream parsers and usage walkers: events end at a blank line, an event's data is its data lines joined with "\n", lines end in LF, CRLF or CR, and comments and unknown fields are ignored. |
|
Package model is the public, read-only discovery view of a catalogued model: its identity, capabilities, the provider that authored it, and the hosts that serve it.
|
Package model is the public, read-only discovery view of a catalogued model: its identity, capabilities, the provider that authored it, and the hosts that serve it. |
|
Package modeldir keeps a consumer's model list as a directory of YAML files, one self-contained file per model, and loads that directory as a *catalog.IndexedCatalog so Resolve, Cost and the context-window fields work unchanged.
|
Package modeldir keeps a consumer's model list as a directory of YAML files, one self-contained file per model, and loads that directory as a *catalog.IndexedCatalog so Resolve, Cost and the context-window fields work unchanged. |
|
Package modelroutes reads and edits a model-routes file: one TOML file listing the models a consumer's picker shows, in order, and the route each one takes (a catalog host, a base URL, an auth hint, an adapter override, an account and a label).
|
Package modelroutes reads and edits a model-routes file: one TOML file listing the models a consumer's picker shows, in order, and the route each one takes (a catalog host, a base URL, an auth hint, an adapter override, an account and a label). |
|
Package oauth provides minimal, vendor-neutral OAuth 2.0 flow helpers for acquiring and refreshing provider credentials.
|
Package oauth provides minimal, vendor-neutral OAuth 2.0 flow helpers for acquiring and refreshing provider credentials. |
|
Package provider is the public, read-only discovery view of a model author (the vendor): its display metadata and the slugs of the models it authors.
|
Package provider is the public, read-only discovery view of a model author (the vendor): its display metadata and the slugs of the models it authors. |
|
Package telemetry reports model calls made directly to a provider to an OTLP/HTTP endpoint, relay's receiver or any other backend, in the OpenTelemetry GenAI semantic conventions.
|
Package telemetry reports model calls made directly to a provider to an OTLP/HTTP endpoint, relay's receiver or any other backend, in the OpenTelemetry GenAI semantic conventions. |
|
Package usage holds the pure wire shapes for usage reporting, token counts and upstream timing, shared by the public client and the server's usage records.
|
Package usage holds the pure wire shapes for usage reporting, token counts and upstream timing, shared by the public client and the server's usage records. |
|
Package v1 defines the relay's canonical protocol — the wire-neutral internal representation that all vendor adapters translate to and from.
|
Package v1 defines the relay's canonical protocol — the wire-neutral internal representation that all vendor adapters translate to and from. |
|
Package wirerules is the table of upstreams that read the Chat Completions shape differently from OpenAI's definition, and the v1.WireRules each one needs, looked up by catalog host name or by the host part of a base URL.
|
Package wirerules is the table of upstreams that read the Chat Completions shape differently from OpenAI's definition, and the v1.WireRules each one needs, looked up by catalog host name or by the host part of a base URL. |
Click to show internal directories.
Click to hide internal directories.