One gateway. Your first governed request.
Run the control plane locally, connect an OpenAI-compatible client, then explore governed tool and agent traffic.
Updated · Public beta
01 / Install the gateway
You need Git and Go 1.24 or newer to build the pinned evaluation source. No beta tag or download is assumed. You also need a provider account or a local model endpoint.
git clone --branch vorflux/v0.2.0-foundation https://github.com/chiragkumarkakwani-ctrl/omniswitch.git
cd omniswitch
git checkout a8a594b
go build -o omniswitch ./cmd/gateway02 / Set the boundaries, then run
Create omniswitch.yaml with authentication on, API-key-scoped caching, and payload logging off. The example uses OpenAI; choose your own provider.
apiVersion: omniswitch.dev/v1
kind: GatewayConfig
gateway:
listen: ":8080"
auth: true
cache_scope: api_key
log_payloads: false
providers:
- name: openai
type: openai
api_key_env: OPENAI_API_KEYKeep provider credentials separate from gateway client keys. Generate a local bootstrap key, and keep it out of git and shared logs.
export OPENAI_API_KEY="your-provider-key"
export OMNISWITCH_AUTH=true
export OMNISWITCH_BOOTSTRAP_API_KEY="$(openssl rand -hex 32)"
export OMNISWITCH_BOOTSTRAP_ROLE=admin
export OMNISWITCH_KEY="$OMNISWITCH_BOOTSTRAP_API_KEY"
./omniswitch serve --config omniswitch.yamlThe foreground server runs on port 8080. Open a second terminal for the client and supply the same gateway key as OMNISWITCH_KEY; do not substitute your provider key.
03 / Make one request
python -m pip install openaiimport os
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:8080/v1",
api_key=os.environ["OMNISWITCH_KEY"],
)
response = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)The SDK sends the gateway key as a Bearer token. Routing, local checks, budgets, and request logs stay in the gateway. Responses and Messages APIs have a separate documented scope.
Verify reachability and readiness
curl --fail http://localhost:8080/healthz
curl --fail http://localhost:8080/readyz/healthz checks reachability; /readyz checks readiness. A healthy process alone does not prove provider connectivity—verify a representative model call too.