jatmn e3230516ad Scope OpenGateway credentials
Remove OPENAI_API_KEY as an OpenGateway credential fallback so the gateway only looks for OPENGATEWAY_API_KEY.

Add a provider catalog guard test that verifies each built-in provider only advertises credential env vars owned by that provider.
2026-05-31 14:16:34 -07:00
2026-05-31 13:11:22 -07:00
2026-05-31 14:16:34 -07:00
2026-05-31 14:16:34 -07:00
2026-05-31 13:11:22 -07:00
2026-05-30 08:37:16 +08:00
2026-05-31 13:11:22 -07:00
2026-05-30 08:37:16 +08:00
2026-05-31 13:11:22 -07:00
2026-05-31 14:01:04 -07:00
2026-05-30 08:37:16 +08:00

zero

To install dependencies:

bun install

To run:

bun run dev

To list built-in provider catalog entries:

bun run src/index.ts providers catalog

Provider catalog

Provider, gateway, and local endpoint catalog entries live in src/providers/catalog/definitions. Global model metadata lives in src/providers/catalog/models.

Top-level providers are services that self-publish model families, such as OpenAI with GPT/o-series, Anthropic with Claude/Opus, Google with Gemini, and DeepSeek with DeepSeek models. Gateways should usually reference those global models instead of redefining them.

Minimal gateway example:

id = "my-gateway"
name = "My Gateway"
kind = "gateway"
description = "OpenAI-compatible gateway"
category = "aggregating"
baseURL = "https://api.example.com/v1"
defaultModel = "vendor/model-name"
apiKeyRequired = true
credentialEnvVars = ["MY_GATEWAY_API_KEY"]
costCurrency = "USD"

[setup]
requiresAuth = true
authMode = "api-key"

[transportConfig]
kind = "openai-compatible"
maxTokensField = "max_completion_tokens"
removeBodyFields = ["store", "stream_options"]
authHeader.name = "authorization"
authHeader.scheme = "bearer"
headers.X-Trace-Source = "zero"
headers.X-Tenant = "$MY_GATEWAY_TENANT"

[catalog]
source = "hybrid"
discoveryCacheTtl = "1h"
discoveryRefreshMode = "manual"
discovery.kind = "openai-compatible"
discovery.requiresAuth = true
discovery.path = "/models"

[[catalog.models]]
globalModelId = "gpt-4o"
apiName = "openai/gpt-4o"
contextWindow = 32000
maxOutputTokens = 4096
cost.inputPerMillion = 2.50
cost.outputPerMillion = 10.00

[[catalog.models]]
globalModelId = "claude-sonnet-4"
apiName = "anthropic/claude-sonnet-4"
contextWindow = 200000
maxOutputTokens = 64000
cost.inputPerMillion = 3.00
cost.outputPerMillion = 15.00

Detailed docs:

This project was created using bun init in bun v1.3.11. Bun is a fast all-in-one JavaScript runtime.

S
Description
The coding agent that answers to you, your model, your machine, your rules.
Readme MIT
51 MiB
0 Stars 1 Watchers 0 Forks
v0.13.0
Latest
2026-11-09 18:08:31 -10:00
Languages
Go 99.5%
JavaScript 0.3%
Shell 0.1%