aibridge

package
v2.30.5 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: AGPL-3.0 Imports: 2 Imported by: 1 module, 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 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

func ExtractAuthToken(header http.Header) string

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.

Jump to

Keyboard shortcuts

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