Documentation
¶
Overview ¶
Package aibridge provides utilities for the AI Bridge feature.
Index ¶
Constants ¶
View Source
const HeaderCoderAuth = "X-Coder-Token"
HeaderCoderAuth is an internal header used to pass the Coder token from AI Proxy to AI Bridge for authentication. This header is stripped by AI Bridge before forwarding requests to upstream providers.
Variables ¶
This section is empty.
Functions ¶
func ExtractAuthToken ¶
ExtractAuthToken extracts an authorization token from HTTP headers. It checks X-Coder-Token first (set by AI Proxy), then falls back to Authorization header (Bearer token) and X-Api-Key header, which represent the different ways clients authenticate against AI providers. If none are present, an empty string is returned.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.