You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 390d95e
Browse filesBrowse the repository at this point in the historyBrowse files
docs: sync all documentation for new providers, endpoints, and config guide
Update 12 documentation files (6 English, 6 Chinese) to reflect:
- Six providers: OpenAI, Anthropic, Google Gemini, Azure OpenAI, AWS Bedrock, Custom
- Three API formats: /v1/chat/completions, /v1/messages, /v1/responses
- Provider auto-loading with default model prefixes
- AWS SigV4 signing and binary event-stream streaming for Bedrock
- Built-in Configuration Guide page (/gateway/guide)
- Azure OpenAI deployment URL pattern and api-key auth
- Full API reference for /v1/messages and /v1/responses endpoints
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@@ -43,9 +43,10 @@ AgentBastion solves all of this with a single deployment.
43
43
## Key Features
44
44
45
45
### AI API Gateway
46
-
-**OpenAI-compatible proxy** — drop-in replacement; point `OPENAI_BASE_URL` at AgentBastion and go
47
-
-**Multi-provider routing** — OpenAI, Anthropic, Google Gemini, Azure, or any OpenAI-compatible endpoint
48
-
-**Automatic format conversion** — Anthropic Messages API, Google Gemini, and more, all behind a single OpenAI-compatible interface
46
+
-**Multi-format API proxy** — natively serves OpenAI Chat Completions (`/v1/chat/completions`), Anthropic Messages (`/v1/messages`), and OpenAI Responses (`/v1/responses`) APIs on a single port; works as a drop-in replacement for Cursor, Continue, Cline, Claude Code, and the OpenAI/Anthropic SDKs
47
+
-**Multi-provider routing** — OpenAI, Anthropic, Google Gemini, Azure OpenAI, AWS Bedrock, or any OpenAI-compatible endpoint
48
+
-**Automatic format conversion** — Anthropic Messages API, Google Gemini, Azure OpenAI, AWS Bedrock Converse API, and more, all behind a unified interface
49
+
-**Provider auto-loading** — active providers are loaded from the database at startup and registered in the model router; default model prefixes (`gpt-`/`o1-`/`o3-`/`o4-` for OpenAI, `claude-` for Anthropic, `gemini-` for Google) route automatically; Azure and Bedrock require explicit model registration
49
50
-**Streaming SSE pass-through** — zero-overhead forwarding with real-time token counting
50
51
-**Virtual API keys** — issue scoped `ab-` keys per team, per project, per developer; revoke in one click
51
52
-**API key lifecycle management** — automatic rotation with grace periods, per-key inactivity timeout, expiry warnings, and background policy enforcement
@@ -77,6 +78,7 @@ AgentBastion solves all of this with a single deployment.
77
78
### Operations & Configuration
78
79
-**Dynamic configuration** — most settings stored in database (`system_settings` table), configurable via Web UI (Admin > Settings with 7 category tabs)
79
80
-**First-run setup wizard** — guided `/setup` wizard creates the super_admin account, configures the site, and optionally adds the first provider and API key
81
+
-**Configuration Guide** — built-in `/gateway/guide` page in the web console with copy-paste setup instructions for Claude Code, Cursor, Continue, Cline, OpenAI SDK, Anthropic SDK, and cURL; auto-detects the gateway URL
80
82
-**Multi-instance sync** — configuration changes propagated across instances via Redis Pub/Sub
81
83
-**Data retention policies** — configurable retention periods for usage records and audit logs with automatic daily purge
82
84
@@ -134,7 +136,7 @@ See the **[Deployment Guide](docs/en/deployment-guide.md)** for production setup
134
136
135
137
| Port | Server | Exposure | Purpose |
136
138
|------|--------|----------|---------|
137
-
|`3000`| Gateway |**Public** — expose to AI clients |`/v1/chat/completions`, `/v1/models`, `/mcp`, `/metrics`, `/health/*`|
139
+
|`3000`| Gateway |**Public** — expose to AI clients |`/v1/chat/completions`, `/v1/messages`, `/v1/responses`, `/v1/models`, `/mcp`, `/metrics`, `/health/*`|
All three endpoints authenticate identically (API Key or JWT), route through the same model router and rate limiter, and produce the same usage records and audit logs.
38
+
28
39
### POST /v1/chat/completions
29
40
30
41
OpenAI-compatible chat completions endpoint. Proxies requests to the configured upstream provider.
Anthropic Messages API endpoint. Accepts requests in the native Anthropic format and proxies them to the configured upstream provider. This allows Claude Code and the Anthropic SDK to connect directly without format translation on the client side.
204
+
205
+
**Authentication:** API Key or JWT
206
+
207
+
#### Request Body
208
+
209
+
```json
210
+
{
211
+
"model": "claude-sonnet-4-20250514",
212
+
"max_tokens": 1024,
213
+
"messages": [
214
+
{
215
+
"role": "user",
216
+
"content": "Hello, Claude"
217
+
}
218
+
],
219
+
"stream": false,
220
+
"system": "You are a helpful assistant.",
221
+
"temperature": 0.7
222
+
}
223
+
```
224
+
225
+
| Field | Type | Required | Default | Description |
OpenAI Responses API endpoint (2025 format). Accepts requests in the OpenAI Responses format, which supports both simple string inputs and structured message arrays.
300
+
301
+
**Authentication:** API Key or JWT
302
+
303
+
#### Request Body
304
+
305
+
```json
306
+
{
307
+
"model": "gpt-4o",
308
+
"input": "What is the capital of France?",
309
+
"instructions": "You are a helpful geography assistant.",
310
+
"stream": false,
311
+
"temperature": 0.7,
312
+
"max_output_tokens": 4096
313
+
}
314
+
```
315
+
316
+
The `input` field can be either a simple string or an array of message objects:
317
+
318
+
```json
319
+
{
320
+
"model": "gpt-4o",
321
+
"input": [
322
+
{"role": "user", "content": "Hello"},
323
+
{"role": "assistant", "content": "Hi there!"},
324
+
{"role": "user", "content": "What is 2+2?"}
325
+
]
326
+
}
327
+
```
328
+
329
+
| Field | Type | Required | Default | Description |
0 commit comments