Documentation
¶
Overview ¶
Package aiproxy serves the openai and exa addons: apps call it with a per-space token, which it checks against the bindings donkey issued and swaps for the platform's real credential. The key never leaves donkey-system, and removing the service revokes the space's access.
It runs as its own workload (donkey-ai) rather than inside donkey-server, because this is the one donkey endpoint tenant code is *meant* to reach. Keeping it out of the admin API's process means a flaw in the part apps can talk to does not sit in the process that can write to the cluster.
Index ¶
Constants ¶
const ExaPrefix = "/exa/"
const Prefix = "/v1/"
Prefix is where the proxy is mounted. donkey-ai serves it at the root of its own listener, so an app's OPENAI_BASE_URL is an ordinary /v1 endpoint.
Variables ¶
This section is empty.
Functions ¶
func ExaHandler ¶
ExaHandler fronts only search and contents; account-management APIs never receive the platform credential. Custom bases may include a gateway prefix.
Types ¶
type Config ¶
type Config struct {
Listen string
// UpstreamURL/UpstreamKey are the platform's own AI endpoint and
// credential. The credential never travels past this process.
UpstreamURL string
UpstreamKey string
ExaURL string
ExaKey string
}
Config is what donkey-ai reads from its environment: the endpoints it fronts, the credentials it swaps in, and where to look for the per-space tokens. No session key, no registry, no builder — this process holds nothing the admin API holds.