-
Notifications
You must be signed in to change notification settings - Fork 210
docs(config): add GAIB Token Kiosk provider preset and guide #540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| schema_version = 1 | ||
|
|
||
| # GAIB Token Kiosk provider integration preset | ||
| # Base URL: https://agent-router.gaib.ai/v1 | ||
|
|
||
| [llm_clients.token_kiosk_openai] | ||
| format = "openai_chat" | ||
| base_url = "https://agent-router.gaib.ai/v1" | ||
| api_key_env = "TOKEN_KIOSK_API_KEY" | ||
|
|
||
| [llm_clients.token_kiosk_anthropic] | ||
| format = "anthropic_messages" | ||
| base_url = "https://agent-router.gaib.ai/v1" | ||
| api_key_env = "TOKEN_KIOSK_API_KEY" | ||
|
Comment on lines
+11
to
+14
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- target file ---'
cat -n examples/routes.token_kiosk.toml
printf '%s\n' '--- related route/client references ---'
rg -n -C 3 'token_kiosk|anthropic_messages|openai_chat|TOKEN_KIOSK_API_KEY|gaib\.ai' .Repository: NVIDIA-NeMo/Switchyard Length of output: 50380 🌐 Web query:
💡 Result: The GAIB "Token Kiosk" is a service integrated into AI routing platforms (such as LiteLLM) that acts as an OpenAI-compatible provider [1]. It is distinct from the official Anthropic Messages API [2]. Key points regarding the requested services: 1. GAIB Token Kiosk API: This service provides an OpenAI-compatible API endpoint for LLM access. Technical documentation for the Token Kiosk indicates that it uses the base URL https://agent-router.gaib.ai/v1 [1]. It is designed to be configured as an LLM provider within tools that support OpenAI-compatible APIs (like LiteLLM, where it is registered as token_kiosk) [1]. GAIB (GAIB AI) itself is an infrastructure capital partner focused on financing compute assets and is not an official model provider for Anthropic [3][4]. 2. Anthropic Messages Endpoint: The official Anthropic Messages API is accessed via the endpoint https://api.anthropic.com/v1/messages [2][5]. It requires the x-api-key header for authentication and the anthropic-version header [2][5]. The model ID is passed as a string parameter (e.g., claude-3-5-sonnet-20241022 or other supported model identifiers) within the JSON request body [2][5]. In summary, the GAIB Token Kiosk is a routing/provider integration layer, while the Anthropic Messages API is the direct interface for accessing Anthropic's models [1][2]. If you are using the Token Kiosk to access models, you are interfacing with GAIB's infrastructure, not directly with the Anthropic API endpoint [1]. Citations:
🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- upstream URL construction ---'
sed -n '1,180p' crates/libsy-llm-client/src/backend.rs
printf '%s\n' '--- configuration and format documentation ---'
sed -n '42,66p' docs/reference/toml_schema.md
sed -n '44,54p' docs/architecture.md
printf '%s\n' '--- precise URL tests and implementation references ---'
rg -n -C 5 'AnthropicMessages|anthropic_messages|/v1/messages|url\(\)' crates/libsy-llm-client/src/backend.rs crates/libsy-llm-client/src crates/switchyard-runner/src/config.rs docs
printf '%s\n' '--- GAIB documentation response headers/content ---'
curl -L --max-time 15 -sS -D /tmp/gaib-docs.headers https://docs-agent.gaib.ai/docs/api/overview -o /tmp/gaib-docs.body || true
sed -n '1,20p' /tmp/gaib-docs.headers
rg -n -i -C 2 'chat/completions|anthropic|model|token kiosk|agent-router' /tmp/gaib-docs.body | head -80 || trueRepository: NVIDIA-NeMo/Switchyard Length of output: 50381 🏁 Script executed: #!/bin/bash
set -eu
python3 - <<'PY'
from pathlib import Path
import re
p = Path("examples/routes.token_kiosk.toml")
text = p.read_text()
clients = {}
current = None
for line in text.splitlines():
m = re.fullmatch(r"\[llm_clients\.([^\]]+)\]", line)
if m:
current = m.group(1)
clients[current] = {}
elif current:
m = re.fullmatch(r'(format|base_url|api_key_env) = "([^"]*)"', line)
if m:
clients[current][m.group(1)] = m.group(2)
print("parsed clients:")
for name, cfg in clients.items():
print(name, cfg)
base = clients["token_kiosk_anthropic"]["base_url"].rstrip("/")
print("anthropic_messages URL:", base + "/v1/messages")
print("openai_chat URL:", clients["token_kiosk_openai"]["base_url"].rstrip("/") + "/chat/completions")
PYRepository: NVIDIA-NeMo/Switchyard Length of output: 580 Use a supported upstream request format. GAIB Token Kiosk exposes an OpenAI-compatible API. It does not document Anthropic Messages support. Change 🤖 Prompt for AI Agents |
||
|
|
||
| [targets.token_kiosk_gpt] | ||
| id = "gpt-4o" | ||
| llm_client = "token_kiosk_openai" | ||
|
|
||
| [targets.token_kiosk_claude] | ||
| id = "claude-3-5-sonnet-20241022" | ||
| llm_client = "token_kiosk_anthropic" | ||
|
Comment on lines
+16
to
+22
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- candidate files ---'
git ls-files | grep -E '(^|/)(routes\.token_kiosk\.toml|.*token.*kiosk.*|.*config.*)$' | head -80
printf '%s\n' '--- target file ---'
cat -n examples/routes.token_kiosk.toml
printf '%s\n' '--- model/client references ---'
rg -n --glob '!node_modules' --glob '!dist' 'token_kiosk|llm_client|anthropic_messages|/v1/models|provider.*/.*model|model ID|model_id' .Repository: NVIDIA-NeMo/Switchyard Length of output: 46869 🌐 Web query:
💡 Result: Token Kiosk model IDs use the format: Example: To retrieve the current model catalog: curl https://agent-router.gaib.ai/v1/modelsThe response includes each model’s:
No authentication is required for 🌐 Web query:
💡 Result: I found the Token Kiosk documentation homepage, but no indexed page specifically matching
Anthropic’s native protocol is instead the Messages API at Citations:
🏁 Script executed: #!/bin/bash
set -eu
python3 - <<'PY'
import json
import pathlib
import tomllib
path = pathlib.Path("examples/routes.token_kiosk.toml")
with path.open("rb") as f:
config = tomllib.load(f)
print("--- parsed targets ---")
for name, target in config["targets"].items():
print(json.dumps({
"name": name,
"id": target["id"],
"llm_client": target["llm_client"],
"has_provider_slash": "/" in target["id"],
}, sort_keys=True))
print("--- parsed clients ---")
for name, client in config["llm_clients"].items():
print(json.dumps({"name": name, **client}, sort_keys=True))
PY
printf '%s\n' '--- endpoint construction and protocol paths ---'
sed -n '1,120p' docs/architecture.md
sed -n '370,445p' crates/libsy-llm-client/src/client.rs
sed -n '450,540p' crates/switchyard-server/src/lib.rsRepository: NVIDIA-NeMo/Switchyard Length of output: 280 🏁 Script executed: #!/bin/bash
set -eu
curl --fail --silent --show-error --max-time 15 \
https://agent-router.gaib.ai/v1/models |
python3 - <<'PY'
import json
import sys
body = json.load(sys.stdin)
items = body.get("data", body if isinstance(body, list) else [])
print("--- live Token Kiosk model IDs ---")
for item in items:
if isinstance(item, dict) and "id" in item:
print(item["id"])
PYRepository: NVIDIA-NeMo/Switchyard Length of output: 838 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- configured target/client values ---'
awk '
/^\[llm_clients\./ || /^\[targets\./ { print; section=$0 }
/^(format|base_url|api_key_env|id|llm_client) =/ { print " " $0 }
' examples/routes.token_kiosk.toml
printf '%s\n' '--- protocol endpoint documentation ---'
sed -n '40,58p' docs/architecture.md
sed -n '40,105p' docs/reference/toml_schema.md
printf '%s\n' '--- upstream client URL construction ---'
sed -n '370,440p' crates/libsy-llm-client/src/client.rs
printf '%s\n' '--- server protocol routes ---'
sed -n '465,535p' crates/switchyard-server/src/lib.rsRepository: NVIDIA-NeMo/Switchyard Length of output: 10074 🏁 Script executed: #!/bin/bash
set -eu
response="$(curl --fail --silent --show-error --max-time 15 https://agent-router.gaib.ai/v1/models)"
printf '%s\n' '--- live Token Kiosk response model IDs ---'
printf '%s' "$response" | tr '{},' '\n' | grep -E '"id"|"provider"' | head -80
printf '%s\n' '--- configured IDs found verbatim in response ---'
for id in gpt-4o claude-3-5-sonnet-20241022; do
if printf '%s' "$response" | grep -Fq "\"$id\""; then
printf '%s: present\n' "$id"
else
printf '%s: absent\n' "$id"
fi
doneRepository: NVIDIA-NeMo/Switchyard Length of output: 2949 Use Token Kiosk model IDs and the OpenAI Chat Completions format.
🤖 Prompt for AI Agents |
||
|
|
||
| [routes.token_kiosk_chat] | ||
| id = "token-kiosk-openai" | ||
| type = "passthrough" | ||
| target = "token_kiosk_gpt" | ||
|
|
||
| [routes.token_kiosk_messages] | ||
| id = "token-kiosk-anthropic" | ||
| type = "passthrough" | ||
| target = "token_kiosk_claude" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Document the required
TOKEN_KIOSK_API_KEYexport.The new instruction tells users to set
base_url, butexamples/routes.token_kiosk.tomlrequiresTOKEN_KIOSK_API_KEYthroughapi_key_env. The server rejects the configuration when that variable is missing or empty. Add an explicit export instruction before the dry-run step.🤖 Prompt for AI Agents