wirerules

package
v0.7.28 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2026 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

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. Relay's server and the SDK client both read it, so a call made through relay and one made straight to the upstream send the same bytes.

An upstream not listed gets zero rules: no prior reasoning is sent back, since some Chat Completions upstreams reject the field (Mistral answers 422). Out of scope: other wire shapes, applying the rules (a v1.WireRulesSerializer does that), and per-model rules.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChatCompletionsByBaseURL

func ChatCompletionsByBaseURL(baseURL string) v1.WireRules

ChatCompletionsByBaseURL returns the Chat Completions wire rules of the upstream whose host baseURL names (case-insensitive, any scheme, port or path); zero when the table has no row for it.

func ChatCompletionsByHostName

func ChatCompletionsByHostName(name string) v1.WireRules

ChatCompletionsByHostName returns the Chat Completions wire rules of the catalog host with metadata.name name; zero when the table has no row for it.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL