llm

package
v0.77.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package llm holds LLM model-identifier helpers shared by the proxy and the management server. The proxy normalizes model ids parsed off inbound requests; management normalizes the operator's registered model ids at synthesis time so both sides of the pricing / routing contract compare equal.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeBedrockModel

func NormalizeBedrockModel(modelID string) string

NormalizeBedrockModel strips an ARN wrapper, a cross-region inference-profile prefix, and the version/throughput suffix from a Bedrock model id so it matches the catalog/pricing key, e.g. "eu.anthropic.claude-sonnet-4-5-20250929-v1:0" -> "anthropic.claude-sonnet-4-5" and the inference-profile ARN's last segment likewise. It is the single source of truth shared by the proxy's request parser (which normalizes the request model from the URL path), the proxy's router (which normalizes the operator's registered Bedrock model ids so both sides compare equal), and the management synthesizer (which keys per-provider pricing entries by the normalized id the parser will emit at billing time).

func NormalizeVertexModel

func NormalizeVertexModel(modelID string) string

NormalizeVertexModel strips the "@version" suffix from a Vertex AI model id (e.g. "claude-sonnet-4-5@20250929" -> "claude-sonnet-4-5") so it matches the catalog/pricing key. Vertex publisher models are priced under their vendor surface with the bare, unversioned id.

Types

This section is empty.

Jump to

Keyboard shortcuts

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