compatmode

package
v0.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package compatmode holds shared helpers for custom-compatible backend modes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnthropicModelsEndpoint

func AnthropicModelsEndpoint(d endpoint.Descriptor) (string, error)

AnthropicModelsEndpoint joins the default models path for Anthropic-compatible inventory.

func AnthropicModelsEndpointPath

func AnthropicModelsEndpointPath(d endpoint.Descriptor, path string) (string, error)

AnthropicModelsEndpointPath joins a validated, relative model-list path to an Anthropic-compatible base URL. It is intentionally separate from the default operation join so profile quirks cannot alter execution endpoints.

func ApplyCapabilityCeiling

func ApplyCapabilityCeiling(be execbackend.Backend, ceiling lipapi.BackendCaps) execbackend.Backend

ApplyCapabilityCeiling keeps model-aware family resolution from elevating a validated profile above its declared effective capability surface.

func ApplyRuntimePolicy

ApplyRuntimePolicy attaches optional per-instance tokenizer metadata.

func ApplyStaticModelInventory

func ApplyStaticModelInventory(be execbackend.Backend, models config.CompatibleModeModelsConfig) (execbackend.Backend, error)

ApplyStaticModelInventory attaches a static inventory provider when configured.

func FirstAPIKey

func FirstAPIKey(keys []string) string

FirstAPIKey returns the first resolved credential or empty for no-auth.

func OpenAIModelsEndpoint

func OpenAIModelsEndpoint(d endpoint.Descriptor) (string, error)

OpenAIModelsEndpoint joins the models path for OpenAI-compatible inventory.

func ParseEndpoint

func ParseEndpoint(cfg config.CompatibleModeConfig) (endpoint.Descriptor, error)

ParseEndpoint validates base_url for a compatible instance.

func ResolveEnvAPIKeys

func ResolveEnvAPIKeys(apiKeyEnvVarRoot string) []string

ResolveEnvAPIKeys reads numbered env-root keys into an independent slice for one runtime instance. Empty root yields no-auth.

Types

This section is empty.

Jump to

Keyboard shortcuts

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