Spaces:
Paused
Paused
metadata
title: Tool Bridge
emoji: π§
colorFrom: blue
colorTo: purple
sdk: docker
app_port: 8080
pinned: false
short_description: OpenAI/Anthropic tool-calling bridge for non-tool upstreams
newapi-tool-bridge
OpenAI / Anthropic compatible tool-calling bridge proxy.
Wraps an upstream API that lacks native tool calling (e.g. a ChatGPT reverse-proxy)
into an OpenAI-compatible endpoint that supports tools / tool_choice /
parallel_tool_calls, plus full Anthropic Messages API (/v1/messages) translation.
Endpoints
GET /v1/modelsβ list modelsPOST /v1/chat/completionsβ OpenAI Chat CompletionsPOST /v1/messagesβ Anthropic Messages APIGET /healthβ health check- other paths β proxied to upstream
Auth (this deployment)
Public Space, bring-your-own-key: UPSTREAM_AUTH_HEADER is unset, so the
upstream key you send in Authorization: Bearer <key> (or x-api-key) is passed
through to the upstream. No key is baked into this Space.
Config (Space variables)
| var | meaning |
|---|---|
UPSTREAM_BASE_URL |
upstream root (no /v1) |
MODEL_MAP_JSON |
external model name β upstream model name |
PUBLIC_MODEL_IDS_JSON |
model ids returned by /v1/models |
NATIVE_TOOL_MODELS_JSON |
models with native tool calling (passthrough) |
ALLOW_UNMAPPED_MODEL_PASSTHROUGH |
pass unmapped model names through |
Virtual tool calling: for upstreams without native tools, the tool defs are
injected into the system prompt, the model's JSON output is parsed back into
standard tool_calls.