docs: rebuild customer-facing docs across overview, config, cloud, ops, reference, and tutorials - #249

Merged
moonming merged 7 commits into
mainfrom
docs-rebuild-batch-1
May 14, 2026
Merged

docs: rebuild customer-facing docs across overview, config, cloud, ops, reference, and tutorials#249
moonming merged 7 commits into
mainfrom
docs-rebuild-batch-1

Conversation

@moonming

@moonmingmoonming commented May 11, 2026

Copy link
Copy Markdown
Member

Summary

  • rebuild the stale docs/ set into a new customer-facing structure for AISIX AI Gateway and AISIX Cloud
  • document current, verified behavior only, and keep planned or incomplete capability framing in docs/roadmap.md
  • align README.md with the current docs entry points and runtime boundaries

Completed In This PR

  • foundation and orientation pages
  • self-hosted bootstrap and first-request quickstarts
  • gateway configuration docs
  • AISIX Cloud docs
  • operations docs
  • reference docs
  • scenario-driven tutorials
  • README alignment with current docs and runtime boundaries

Docs Added Or Rebuilt

  • docs/index.md
  • docs/roadmap.md
  • docs/overview/*
  • docs/quickstart/self-hosted.md
  • docs/quickstart/first-model-first-key-first-request.md
  • docs/integration/openai-compatible-api.md
  • docs/configuration/*
  • docs/cloud/*
  • docs/operations/*
  • docs/reference/*
  • docs/tutorials/*
  • README.md

Issue Coverage

Completed:

  • #245 landing page, overview, feature matrix, and roadmap
  • #248 gateway configuration docs
  • #242 operations docs
  • #244 reference docs
  • #247 AISIX Cloud docs
  • #241 scenario-driven tutorials
  • #201 admin docs gap for guardrails, cache policies, and observability exporters

Partially completed:

  • #243 quickstarts
    • completed: self-hosted, first-model-first-key-first-request
    • still missing: openai-sdk, anthropic-sdk, aisix-cloud-managed-dp
  • #246 integration guides
    • completed: openai-compatible-api
    • still missing: streaming, tool-calling, anthropic-messages, embeddings, responses, audio, images, rerank, passthrough, errors-and-retries

Notes

  • docs intentionally describe conservative, code-verified behavior where runtime boundaries are still uneven
  • standalone budget enforcement is documented as limited rather than fully active
  • Cloud playground is documented as preview-only and not representative of the managed DP path
  • managed Cloud bootstrap is documented around the current certificate-based flow

Summary by CodeRabbit

  • Documentation
    • Restructured documentation with new landing page and navigation framework featuring overview, configuration, operations, integration, quickstart, tutorial, and reference sections.
    • Added comprehensive guides for deployment modes, feature matrix, core concepts, and provider compatibility.
    • Expanded operational documentation covering health checks, production deployment, TLS/mTLS, upgrades, and troubleshooting.
    • Added quickstart guides and tutorials for common workflows including SDK integration and guardrail configuration.

Review Change Stack

CopilotAI review requested due to automatic review settings May 11, 2026 12:06
@coderabbitai

coderabbitaiBot commented May 11, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Large-scale documentation rebuild: removes legacy docs and adds a structured docs site with new overview, quickstarts, configuration, integrations, cloud operations, references, tutorials, and README adjustments. No source code changes.

Changes

Documentation Restructure

Layer / File(s)Summary
Removals and Cleanup
docs/api-*.md, docs/architecture.md, docs/managed-mode.md, docs/testing.md
Deletes deprecated admin/proxy API, architecture, managed mode, and testing docs.
Landing, Overview, README
docs/index.md, docs/overview/*, README.md
Adds new landing, product overviews, core concepts, deployment modes, feature matrix; updates README.
Quickstarts
docs/quickstart/*
Self-hosted bootstrap, first model/key/request, OpenAI and Anthropic SDKs, AISIX Cloud managed DP.
Configuration Guides
docs/configuration/*
Admin API, bootstrap, models, provider keys, API keys, routing/failover, rate limits, caching, budgets, guardrails, observability exporters, propagation.
Integrations
docs/integration/*
OpenAI-compatible proxy, embeddings, images, audio, rerank, responses, messages (Anthropic), streaming, tool-calling, passthrough, errors/retries.
Cloud
docs/cloud/*
Cloud overview, playground, orgs/environments, certificates/managed DP, resource projection, offline resilience, usage/billing, provider key rotation, Cloud vs self-hosted.
Operations
docs/operations/*
Health checks, metrics/logs, network/security, TLS/mTLS, production deployment, testing/verification, troubleshooting, upgrades/compatibility.
Reference
docs/reference/*
Proxy/admin API references, schemas, headers/error codes, provider compatibility, glossary.
Tutorials
docs/tutorials/*
Guides for guardrails, virtual model failover, caching, observability exporters, OpenAI client to Anthropic upstream, provider key rotation.

Sequence Diagram(s)

(skipped)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR rebuilds the repository documentation structure (new landing/overview/quickstart/roadmap pages and removal of legacy flat docs). It also introduces functional changes to the gateway’s cross-provider tool-calling translation (Anthropic ↔ OpenAI shapes) and adds an E2E test that pins the expected behavior.

Changes:

  • Replaces legacy docs pages with a new docs IA: landing page, overview pages, roadmap, and self-hosted quickstart.
  • Adds E2E coverage for OpenAI-tools → Anthropic-tools/tool_use → OpenAI-tool_calls translation.
  • Updates Rust proxy/provider code to forward tool_calls via message.extra and to translate OpenAI tools into Anthropic’s tools shape.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 8 comments.

Show a summary per file
FileDescription
tests/e2e/src/cases/tools-cross-provider-e2e.test.tsAdds a new E2E scenario covering cross-provider tool translation.
docs/index.mdNew docs landing page and navigation structure.
docs/roadmap.mdNew roadmap page to contain planned/incomplete capabilities.
docs/overview/what-is-aisix-ai-gateway.mdNew “what is” overview page.
docs/overview/deployment-modes.mdNew overview comparing self-hosted vs Cloud managed DP.
docs/overview/core-concepts.mdNew glossary of core entities and boundaries.
docs/overview/feature-matrix.mdNew capability/status matrix for Gateway vs Cloud.
docs/quickstart/self-hosted.mdNew quickstart for bootstrapping a self-hosted gateway.
docs/testing.mdRemoves legacy testing doc page.
docs/managed-mode.mdRemoves legacy managed-mode doc page.
docs/architecture.mdRemoves legacy architecture doc page.
docs/api-proxy.mdRemoves legacy proxy API doc page.
docs/api-admin.mdRemoves legacy admin API doc page.
crates/aisix-proxy/src/render.rsExtends rendered OpenAI message shape to flatten message.extra onto the wire (e.g., tool_calls).
crates/aisix-provider-anthropic/src/wire.rsImplements OpenAI-tools → Anthropic-tools translation and Anthropic tool_use → OpenAI tool_calls response mapping.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- `gemini`
- `deepseek`

Provider support is not identical across every endpoint. See [Provider Compatibility](../reference/provider-compatibility.md) for the current matrix.
Comment threaddocs/overview/deployment-modes.md Outdated
Comment on lines +66 to +73
See [AISIX Cloud Overview](../cloud/overview.md) and [Cloud Playground](../cloud/cloud-playground.md) for details.

## Related Pages

- [What Is AISIX AI Gateway](what-is-aisix-ai-gateway.md)
- [Core Concepts](core-concepts.md)
- [AISIX Cloud Overview](../cloud/overview.md)
- [AISIX Cloud Managed Data Plane Quickstart](../quickstart/aisix-cloud-managed-dp.md)
Comment threaddocs/quickstart/self-hosted.md Outdated
Comment on lines +88 to +94
```json
{
"status": "ok",
"models": 0,
"apikeys": 0,
"providers": 0
}
Comment on lines +14 to +21
// E2E: tool / function calling cross-provider translation. Per
// gateway docs `docs/api-proxy.md` §6 outbound-axis table:
//
// > Anthropic | /v1/messages | /v1/chat/completions (full translation)
// > | The Hub maps content blocks ↔ messages, **tool_use ↔ tool_calls**,
// > | system extraction, cache_control passthrough, stop_reason
// > | normalisation
//
Comment on lines +239 to +245
/// and `input` is a JSON object with the tool's arguments. Per
/// docs §6 outbound-axis table ("tool_use ↔ tool_calls"), the
/// gateway translates this into OpenAI's `tool_calls` shape on
/// the response so OpenAI-SDK callers (and every agent framework
/// built on that shape) work transparently against Anthropic
/// upstreams.
/// <https://docs.anthropic.com/en/api/messages#example-of-tool-use>
Comment on lines 30 to +33
pub struct RenderedMessage {
pub role: &'static str,
pub content: String,
/// Forward-compatible bag for OpenAI message-level fields the
"type": "function",
"function": {
"name": name,
"arguments": serde_json::to_string(input).unwrap_or_default(),
Comment threaddocs/index.md
Comment on lines +1 to +7
---
title: AISIX AI Gateway Documentation
description: Official documentation for AISIX AI Gateway and AISIX Cloud, including quickstarts, integration guides, configuration, operations, API reference, and roadmap.
sidebar_position: 1
---

AISIX AI Gateway is an AI gateway for platform engineers and AI agent developers who need a consistent way to route, govern, and observe LLM traffic across multiple providers. AISIX Cloud extends that gateway with a managed control plane and managed data-plane workflows.
CopilotAI review requested due to automatic review settings May 11, 2026 14:30

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 59 out of 59 changed files in this pull request and generated 3 comments.

Comment on lines +14 to +20
// E2E: tool / function calling cross-provider translation. Per
// gateway docs `docs/api-proxy.md` §6 outbound-axis table:
//
// > Anthropic | /v1/messages | /v1/chat/completions (full translation)
// > | The Hub maps content blocks ↔ messages, **tool_use ↔ tool_calls**,
// > | system extraction, cache_control passthrough, stop_reason
// > | normalisation
Comment on lines +95 to +97
| `request_body_limit_bytes` | request-body limit enforced by the proxy listener |
| `tls` | optional TLS certificate and key for the proxy listener |

"type": "function",
"function": {
"name": name,
"arguments": serde_json::to_string(input).unwrap_or_default(),
@moonmingmoonming changed the title docs: rebuild docs foundation with new overview and roadmapdocs: rebuild customer-facing docs across overview, config, cloud, ops, reference, and tutorialsMay 11, 2026
CopilotAI review requested due to automatic review settings May 12, 2026 00:08

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 69 out of 69 changed files in this pull request and generated 3 comments.

| Field | Description |
| --- | --- |
| `addr` | proxy listener address |
| `request_body_limit_bytes` | request-body limit enforced by the proxy listener |
Comment threaddocs/quickstart/openai-sdk.md Outdated
Comment on lines +33 to +53
```ts title="openai-sdk-example.ts"
import OpenAI from "openai";

const client = new OpenAI({
apiKey: process.env.AISIX_API_KEY,
baseURL: "http://127.0.0.1:3000/v1",
});

const response = await client.chat.completions.create({
model: "gpt-4o-prod",
messages: [{ role: "user", content: "Say hello from AISIX." }],
});

console.log(response.choices[0]?.message.content);
```

## Run It

```bash title="Run the OpenAI SDK example"
AISIX_API_KEY=sk-demo-caller node openai-sdk-example.ts
```
Comment threadREADME.md
- **Observability** — Prometheus `/metrics`; per-request structured access log; per-env `ObservabilityExporter` (`kind=otlp_http`) fan-out emitting one OTLP/HTTP-JSON GenAI span per chat completion to each enabled exporter (Langfuse, Honeycomb, Grafana Cloud, any OTLP receiver). Platform-level OTLP tracing of internal request-pipeline spans is scaffold ([#49]).

- **Telemetry events** — DP-side `UsageEvent` per request with cache_status, reasoning, provider-id detail, guardrail bypass reason, and `inbound_protocol` (`"openai"` / `"anthropic"`) so dashboard Logs disambiguate the SDK from the upstream `provider` label. Emitted by `/v1/chat/completions` and `/v1/messages` (passthrough-streaming and other endpoints land in a follow-up). Posted to cp-api in managed mode; consumed by `/admin/v1/spend` in standalone.
- **Telemetry events** — DP-side `UsageEvent` per request with cache_status, reasoning, provider-id detail, guardrail bypass reason, and `inbound_protocol` (`"openai"` / `"anthropic"`) so dashboard logs can disambiguate the client protocol from the upstream `provider` label. Emitted by `/v1/chat/completions` and `/v1/messages`; posted to cp-api in managed mode.
CopilotAI review requested due to automatic review settings May 14, 2026 01:09
@moonming
moonmingforce-pushed the docs-rebuild-batch-1 branch from 002db0d to 86b9a1fCompareMay 14, 2026 01:09

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

- quickstart/self-hosted: document the /livez liveness route and plain-text
body (per #257); add Cleanup
- quickstart/openai-sdk: switch to .mjs so \`node\` runs the example without
a TypeScript loader
- quickstart/first-model-first-key-first-request: add production-credentials
warning, 401/403 verification step using the real proxy error envelope,
Cleanup, and a per-provider api_base callout
- integration/openai-compatible-api: add mermaid diagram of the request
path; route list reflects the /livez rename
- integration/errors-and-retries: replace placeholder error.type strings
with the real ProxyError mapping; add 413 RequestTooLarge row; note the
admin {error_msg} envelope distinction
- configuration/provider-keys: warn about plaintext secret storage; replace
the inaccurate OpenAI api_base normalization claim with a per-provider
truth table (refs #270)
- operations/health-checks: rewrite for the /livez liveness contract plus
the /admin/v1/health per-model shape (per #256 + #257)
- reference/proxy-api-reference: /livez instead of /health in the route
list
- tutorials/build-a-virtual-model-with-failover: rewrite end-to-end against
routing-strategies-e2e (deliberately break primary, observe cooldown)
- tutorials/enable-response-caching: rewrite against cache-policy-e2e
(x-aisix-cache miss then hit, different prompt misses again)
- tutorials/add-keyword-guardrails: rewrite against guardrail-keyword-e2e
(422 content_filter; no-leak message contract per #203)
- tutorials/openai-client-to-anthropic-upstream: rewrite against
anthropic-upstream-e2e; document bare-host api_base for Anthropic
Every command, field, header, and error code was cross-checked against the
relevant crate or e2e test on this branch. No mock data; nothing speculative.
@moonming
moonmingforce-pushed the docs-rebuild-batch-1 branch from 86b9a1f to bc8c9d1CompareMay 14, 2026 01:19
@moonming
moonming merged commit f495f7e into mainMay 14, 2026
6 checks passed
This was referenced May 15, 2026
@jarvis9443
jarvis9443 deleted the docs-rebuild-batch-1 branch June 25, 2026 06:25
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@moonming
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

docs: rebuild customer-facing docs across overview, config, cloud, ops, reference, and tutorials - #249

Merged
moonming merged 7 commits into
mainfrom
docs-rebuild-batch-1
May 14, 2026
Merged

docs: rebuild customer-facing docs across overview, config, cloud, ops, reference, and tutorials#249
moonming merged 7 commits into
mainfrom
docs-rebuild-batch-1

Conversation

@moonming

@moonmingmoonming commented May 11, 2026

Copy link
Copy Markdown
Member

Summary

  • rebuild the stale docs/ set into a new customer-facing structure for AISIX AI Gateway and AISIX Cloud
  • document current, verified behavior only, and keep planned or incomplete capability framing in docs/roadmap.md
  • align README.md with the current docs entry points and runtime boundaries

Completed In This PR

  • foundation and orientation pages
  • self-hosted bootstrap and first-request quickstarts
  • gateway configuration docs
  • AISIX Cloud docs
  • operations docs
  • reference docs
  • scenario-driven tutorials
  • README alignment with current docs and runtime boundaries

Docs Added Or Rebuilt

  • docs/index.md
  • docs/roadmap.md
  • docs/overview/*
  • docs/quickstart/self-hosted.md
  • docs/quickstart/first-model-first-key-first-request.md
  • docs/integration/openai-compatible-api.md
  • docs/configuration/*
  • docs/cloud/*
  • docs/operations/*
  • docs/reference/*
  • docs/tutorials/*
  • README.md

Issue Coverage

Completed:

  • #245 landing page, overview, feature matrix, and roadmap
  • #248 gateway configuration docs
  • #242 operations docs
  • #244 reference docs
  • #247 AISIX Cloud docs
  • #241 scenario-driven tutorials
  • #201 admin docs gap for guardrails, cache policies, and observability exporters

Partially completed:

  • #243 quickstarts
    • completed: self-hosted, first-model-first-key-first-request
    • still missing: openai-sdk, anthropic-sdk, aisix-cloud-managed-dp
  • #246 integration guides
    • completed: openai-compatible-api
    • still missing: streaming, tool-calling, anthropic-messages, embeddings, responses, audio, images, rerank, passthrough, errors-and-retries

Notes

  • docs intentionally describe conservative, code-verified behavior where runtime boundaries are still uneven
  • standalone budget enforcement is documented as limited rather than fully active
  • Cloud playground is documented as preview-only and not representative of the managed DP path
  • managed Cloud bootstrap is documented around the current certificate-based flow

Summary by CodeRabbit

  • Documentation
    • Restructured documentation with new landing page and navigation framework featuring overview, configuration, operations, integration, quickstart, tutorial, and reference sections.
    • Added comprehensive guides for deployment modes, feature matrix, core concepts, and provider compatibility.
    • Expanded operational documentation covering health checks, production deployment, TLS/mTLS, upgrades, and troubleshooting.
    • Added quickstart guides and tutorials for common workflows including SDK integration and guardrail configuration.

Review Change Stack

CopilotAI review requested due to automatic review settings May 11, 2026 12:06
@coderabbitai

coderabbitaiBot commented May 11, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Large-scale documentation rebuild: removes legacy docs and adds a structured docs site with new overview, quickstarts, configuration, integrations, cloud operations, references, tutorials, and README adjustments. No source code changes.

Changes

Documentation Restructure

Layer / File(s)Summary
Removals and Cleanup
docs/api-*.md, docs/architecture.md, docs/managed-mode.md, docs/testing.md
Deletes deprecated admin/proxy API, architecture, managed mode, and testing docs.
Landing, Overview, README
docs/index.md, docs/overview/*, README.md
Adds new landing, product overviews, core concepts, deployment modes, feature matrix; updates README.
Quickstarts
docs/quickstart/*
Self-hosted bootstrap, first model/key/request, OpenAI and Anthropic SDKs, AISIX Cloud managed DP.
Configuration Guides
docs/configuration/*
Admin API, bootstrap, models, provider keys, API keys, routing/failover, rate limits, caching, budgets, guardrails, observability exporters, propagation.
Integrations
docs/integration/*
OpenAI-compatible proxy, embeddings, images, audio, rerank, responses, messages (Anthropic), streaming, tool-calling, passthrough, errors/retries.
Cloud
docs/cloud/*
Cloud overview, playground, orgs/environments, certificates/managed DP, resource projection, offline resilience, usage/billing, provider key rotation, Cloud vs self-hosted.
Operations
docs/operations/*
Health checks, metrics/logs, network/security, TLS/mTLS, production deployment, testing/verification, troubleshooting, upgrades/compatibility.
Reference
docs/reference/*
Proxy/admin API references, schemas, headers/error codes, provider compatibility, glossary.
Tutorials
docs/tutorials/*
Guides for guardrails, virtual model failover, caching, observability exporters, OpenAI client to Anthropic upstream, provider key rotation.

Sequence Diagram(s)

(skipped)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR rebuilds the repository documentation structure (new landing/overview/quickstart/roadmap pages and removal of legacy flat docs). It also introduces functional changes to the gateway’s cross-provider tool-calling translation (Anthropic ↔ OpenAI shapes) and adds an E2E test that pins the expected behavior.

Changes:

  • Replaces legacy docs pages with a new docs IA: landing page, overview pages, roadmap, and self-hosted quickstart.
  • Adds E2E coverage for OpenAI-tools → Anthropic-tools/tool_use → OpenAI-tool_calls translation.
  • Updates Rust proxy/provider code to forward tool_calls via message.extra and to translate OpenAI tools into Anthropic’s tools shape.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 8 comments.

Show a summary per file
FileDescription
tests/e2e/src/cases/tools-cross-provider-e2e.test.tsAdds a new E2E scenario covering cross-provider tool translation.
docs/index.mdNew docs landing page and navigation structure.
docs/roadmap.mdNew roadmap page to contain planned/incomplete capabilities.
docs/overview/what-is-aisix-ai-gateway.mdNew “what is” overview page.
docs/overview/deployment-modes.mdNew overview comparing self-hosted vs Cloud managed DP.
docs/overview/core-concepts.mdNew glossary of core entities and boundaries.
docs/overview/feature-matrix.mdNew capability/status matrix for Gateway vs Cloud.
docs/quickstart/self-hosted.mdNew quickstart for bootstrapping a self-hosted gateway.
docs/testing.mdRemoves legacy testing doc page.
docs/managed-mode.mdRemoves legacy managed-mode doc page.
docs/architecture.mdRemoves legacy architecture doc page.
docs/api-proxy.mdRemoves legacy proxy API doc page.
docs/api-admin.mdRemoves legacy admin API doc page.
crates/aisix-proxy/src/render.rsExtends rendered OpenAI message shape to flatten message.extra onto the wire (e.g., tool_calls).
crates/aisix-provider-anthropic/src/wire.rsImplements OpenAI-tools → Anthropic-tools translation and Anthropic tool_use → OpenAI tool_calls response mapping.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- `gemini`
- `deepseek`

Provider support is not identical across every endpoint. See [Provider Compatibility](../reference/provider-compatibility.md) for the current matrix.
Comment threaddocs/overview/deployment-modes.md Outdated
Comment on lines +66 to +73
See [AISIX Cloud Overview](../cloud/overview.md) and [Cloud Playground](../cloud/cloud-playground.md) for details.

## Related Pages

- [What Is AISIX AI Gateway](what-is-aisix-ai-gateway.md)
- [Core Concepts](core-concepts.md)
- [AISIX Cloud Overview](../cloud/overview.md)
- [AISIX Cloud Managed Data Plane Quickstart](../quickstart/aisix-cloud-managed-dp.md)
Comment threaddocs/quickstart/self-hosted.md Outdated
Comment on lines +88 to +94
```json
{
"status": "ok",
"models": 0,
"apikeys": 0,
"providers": 0
}
Comment on lines +14 to +21
// E2E: tool / function calling cross-provider translation. Per
// gateway docs `docs/api-proxy.md` §6 outbound-axis table:
//
// > Anthropic | /v1/messages | /v1/chat/completions (full translation)
// > | The Hub maps content blocks ↔ messages, **tool_use ↔ tool_calls**,
// > | system extraction, cache_control passthrough, stop_reason
// > | normalisation
//
Comment on lines +239 to +245
/// and `input` is a JSON object with the tool's arguments. Per
/// docs §6 outbound-axis table ("tool_use ↔ tool_calls"), the
/// gateway translates this into OpenAI's `tool_calls` shape on
/// the response so OpenAI-SDK callers (and every agent framework
/// built on that shape) work transparently against Anthropic
/// upstreams.
/// <https://docs.anthropic.com/en/api/messages#example-of-tool-use>
Comment on lines 30 to +33
pub struct RenderedMessage {
pub role: &'static str,
pub content: String,
/// Forward-compatible bag for OpenAI message-level fields the
"type": "function",
"function": {
"name": name,
"arguments": serde_json::to_string(input).unwrap_or_default(),
Comment threaddocs/index.md
Comment on lines +1 to +7
---
title: AISIX AI Gateway Documentation
description: Official documentation for AISIX AI Gateway and AISIX Cloud, including quickstarts, integration guides, configuration, operations, API reference, and roadmap.
sidebar_position: 1
---

AISIX AI Gateway is an AI gateway for platform engineers and AI agent developers who need a consistent way to route, govern, and observe LLM traffic across multiple providers. AISIX Cloud extends that gateway with a managed control plane and managed data-plane workflows.
CopilotAI review requested due to automatic review settings May 11, 2026 14:30

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 59 out of 59 changed files in this pull request and generated 3 comments.

Comment on lines +14 to +20
// E2E: tool / function calling cross-provider translation. Per
// gateway docs `docs/api-proxy.md` §6 outbound-axis table:
//
// > Anthropic | /v1/messages | /v1/chat/completions (full translation)
// > | The Hub maps content blocks ↔ messages, **tool_use ↔ tool_calls**,
// > | system extraction, cache_control passthrough, stop_reason
// > | normalisation
Comment on lines +95 to +97
| `request_body_limit_bytes` | request-body limit enforced by the proxy listener |
| `tls` | optional TLS certificate and key for the proxy listener |

"type": "function",
"function": {
"name": name,
"arguments": serde_json::to_string(input).unwrap_or_default(),
@moonmingmoonming changed the title docs: rebuild docs foundation with new overview and roadmapdocs: rebuild customer-facing docs across overview, config, cloud, ops, reference, and tutorialsMay 11, 2026
CopilotAI review requested due to automatic review settings May 12, 2026 00:08

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 69 out of 69 changed files in this pull request and generated 3 comments.

| Field | Description |
| --- | --- |
| `addr` | proxy listener address |
| `request_body_limit_bytes` | request-body limit enforced by the proxy listener |
Comment threaddocs/quickstart/openai-sdk.md Outdated
Comment on lines +33 to +53
```ts title="openai-sdk-example.ts"
import OpenAI from "openai";

const client = new OpenAI({
apiKey: process.env.AISIX_API_KEY,
baseURL: "http://127.0.0.1:3000/v1",
});

const response = await client.chat.completions.create({
model: "gpt-4o-prod",
messages: [{ role: "user", content: "Say hello from AISIX." }],
});

console.log(response.choices[0]?.message.content);
```

## Run It

```bash title="Run the OpenAI SDK example"
AISIX_API_KEY=sk-demo-caller node openai-sdk-example.ts
```
Comment threadREADME.md
- **Observability** — Prometheus `/metrics`; per-request structured access log; per-env `ObservabilityExporter` (`kind=otlp_http`) fan-out emitting one OTLP/HTTP-JSON GenAI span per chat completion to each enabled exporter (Langfuse, Honeycomb, Grafana Cloud, any OTLP receiver). Platform-level OTLP tracing of internal request-pipeline spans is scaffold ([#49]).

- **Telemetry events** — DP-side `UsageEvent` per request with cache_status, reasoning, provider-id detail, guardrail bypass reason, and `inbound_protocol` (`"openai"` / `"anthropic"`) so dashboard Logs disambiguate the SDK from the upstream `provider` label. Emitted by `/v1/chat/completions` and `/v1/messages` (passthrough-streaming and other endpoints land in a follow-up). Posted to cp-api in managed mode; consumed by `/admin/v1/spend` in standalone.
- **Telemetry events** — DP-side `UsageEvent` per request with cache_status, reasoning, provider-id detail, guardrail bypass reason, and `inbound_protocol` (`"openai"` / `"anthropic"`) so dashboard logs can disambiguate the client protocol from the upstream `provider` label. Emitted by `/v1/chat/completions` and `/v1/messages`; posted to cp-api in managed mode.
CopilotAI review requested due to automatic review settings May 14, 2026 01:09
@moonming
moonmingforce-pushed the docs-rebuild-batch-1 branch from 002db0d to 86b9a1fCompareMay 14, 2026 01:09

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

- quickstart/self-hosted: document the /livez liveness route and plain-text
body (per #257); add Cleanup
- quickstart/openai-sdk: switch to .mjs so \`node\` runs the example without
a TypeScript loader
- quickstart/first-model-first-key-first-request: add production-credentials
warning, 401/403 verification step using the real proxy error envelope,
Cleanup, and a per-provider api_base callout
- integration/openai-compatible-api: add mermaid diagram of the request
path; route list reflects the /livez rename
- integration/errors-and-retries: replace placeholder error.type strings
with the real ProxyError mapping; add 413 RequestTooLarge row; note the
admin {error_msg} envelope distinction
- configuration/provider-keys: warn about plaintext secret storage; replace
the inaccurate OpenAI api_base normalization claim with a per-provider
truth table (refs #270)
- operations/health-checks: rewrite for the /livez liveness contract plus
the /admin/v1/health per-model shape (per #256 + #257)
- reference/proxy-api-reference: /livez instead of /health in the route
list
- tutorials/build-a-virtual-model-with-failover: rewrite end-to-end against
routing-strategies-e2e (deliberately break primary, observe cooldown)
- tutorials/enable-response-caching: rewrite against cache-policy-e2e
(x-aisix-cache miss then hit, different prompt misses again)
- tutorials/add-keyword-guardrails: rewrite against guardrail-keyword-e2e
(422 content_filter; no-leak message contract per #203)
- tutorials/openai-client-to-anthropic-upstream: rewrite against
anthropic-upstream-e2e; document bare-host api_base for Anthropic
Every command, field, header, and error code was cross-checked against the
relevant crate or e2e test on this branch. No mock data; nothing speculative.
@moonming
moonmingforce-pushed the docs-rebuild-batch-1 branch from 86b9a1f to bc8c9d1CompareMay 14, 2026 01:19
@moonming
moonming merged commit f495f7e into mainMay 14, 2026
6 checks passed
This was referenced May 15, 2026
@jarvis9443
jarvis9443 deleted the docs-rebuild-batch-1 branch June 25, 2026 06:25
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@moonming
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

docs: rebuild customer-facing docs across overview, config, cloud, ops, reference, and tutorials - #249

Merged
moonming merged 7 commits into
mainfrom
docs-rebuild-batch-1
May 14, 2026
Merged

docs: rebuild customer-facing docs across overview, config, cloud, ops, reference, and tutorials#249
moonming merged 7 commits into
mainfrom
docs-rebuild-batch-1

Conversation

@moonming

@moonmingmoonming commented May 11, 2026

Copy link
Copy Markdown
Member

Summary

  • rebuild the stale docs/ set into a new customer-facing structure for AISIX AI Gateway and AISIX Cloud
  • document current, verified behavior only, and keep planned or incomplete capability framing in docs/roadmap.md
  • align README.md with the current docs entry points and runtime boundaries

Completed In This PR

  • foundation and orientation pages
  • self-hosted bootstrap and first-request quickstarts
  • gateway configuration docs
  • AISIX Cloud docs
  • operations docs
  • reference docs
  • scenario-driven tutorials
  • README alignment with current docs and runtime boundaries

Docs Added Or Rebuilt

  • docs/index.md
  • docs/roadmap.md
  • docs/overview/*
  • docs/quickstart/self-hosted.md
  • docs/quickstart/first-model-first-key-first-request.md
  • docs/integration/openai-compatible-api.md
  • docs/configuration/*
  • docs/cloud/*
  • docs/operations/*
  • docs/reference/*
  • docs/tutorials/*
  • README.md

Issue Coverage

Completed:

  • #245 landing page, overview, feature matrix, and roadmap
  • #248 gateway configuration docs
  • #242 operations docs
  • #244 reference docs
  • #247 AISIX Cloud docs
  • #241 scenario-driven tutorials
  • #201 admin docs gap for guardrails, cache policies, and observability exporters

Partially completed:

  • #243 quickstarts
    • completed: self-hosted, first-model-first-key-first-request
    • still missing: openai-sdk, anthropic-sdk, aisix-cloud-managed-dp
  • #246 integration guides
    • completed: openai-compatible-api
    • still missing: streaming, tool-calling, anthropic-messages, embeddings, responses, audio, images, rerank, passthrough, errors-and-retries

Notes

  • docs intentionally describe conservative, code-verified behavior where runtime boundaries are still uneven
  • standalone budget enforcement is documented as limited rather than fully active
  • Cloud playground is documented as preview-only and not representative of the managed DP path
  • managed Cloud bootstrap is documented around the current certificate-based flow

Summary by CodeRabbit

  • Documentation
    • Restructured documentation with new landing page and navigation framework featuring overview, configuration, operations, integration, quickstart, tutorial, and reference sections.
    • Added comprehensive guides for deployment modes, feature matrix, core concepts, and provider compatibility.
    • Expanded operational documentation covering health checks, production deployment, TLS/mTLS, upgrades, and troubleshooting.
    • Added quickstart guides and tutorials for common workflows including SDK integration and guardrail configuration.

Review Change Stack

CopilotAI review requested due to automatic review settings May 11, 2026 12:06
@coderabbitai

coderabbitaiBot commented May 11, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Large-scale documentation rebuild: removes legacy docs and adds a structured docs site with new overview, quickstarts, configuration, integrations, cloud operations, references, tutorials, and README adjustments. No source code changes.

Changes

Documentation Restructure

Layer / File(s)Summary
Removals and Cleanup
docs/api-*.md, docs/architecture.md, docs/managed-mode.md, docs/testing.md
Deletes deprecated admin/proxy API, architecture, managed mode, and testing docs.
Landing, Overview, README
docs/index.md, docs/overview/*, README.md
Adds new landing, product overviews, core concepts, deployment modes, feature matrix; updates README.
Quickstarts
docs/quickstart/*
Self-hosted bootstrap, first model/key/request, OpenAI and Anthropic SDKs, AISIX Cloud managed DP.
Configuration Guides
docs/configuration/*
Admin API, bootstrap, models, provider keys, API keys, routing/failover, rate limits, caching, budgets, guardrails, observability exporters, propagation.
Integrations
docs/integration/*
OpenAI-compatible proxy, embeddings, images, audio, rerank, responses, messages (Anthropic), streaming, tool-calling, passthrough, errors/retries.
Cloud
docs/cloud/*
Cloud overview, playground, orgs/environments, certificates/managed DP, resource projection, offline resilience, usage/billing, provider key rotation, Cloud vs self-hosted.
Operations
docs/operations/*
Health checks, metrics/logs, network/security, TLS/mTLS, production deployment, testing/verification, troubleshooting, upgrades/compatibility.
Reference
docs/reference/*
Proxy/admin API references, schemas, headers/error codes, provider compatibility, glossary.
Tutorials
docs/tutorials/*
Guides for guardrails, virtual model failover, caching, observability exporters, OpenAI client to Anthropic upstream, provider key rotation.

Sequence Diagram(s)

(skipped)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR rebuilds the repository documentation structure (new landing/overview/quickstart/roadmap pages and removal of legacy flat docs). It also introduces functional changes to the gateway’s cross-provider tool-calling translation (Anthropic ↔ OpenAI shapes) and adds an E2E test that pins the expected behavior.

Changes:

  • Replaces legacy docs pages with a new docs IA: landing page, overview pages, roadmap, and self-hosted quickstart.
  • Adds E2E coverage for OpenAI-tools → Anthropic-tools/tool_use → OpenAI-tool_calls translation.
  • Updates Rust proxy/provider code to forward tool_calls via message.extra and to translate OpenAI tools into Anthropic’s tools shape.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 8 comments.

Show a summary per file
FileDescription
tests/e2e/src/cases/tools-cross-provider-e2e.test.tsAdds a new E2E scenario covering cross-provider tool translation.
docs/index.mdNew docs landing page and navigation structure.
docs/roadmap.mdNew roadmap page to contain planned/incomplete capabilities.
docs/overview/what-is-aisix-ai-gateway.mdNew “what is” overview page.
docs/overview/deployment-modes.mdNew overview comparing self-hosted vs Cloud managed DP.
docs/overview/core-concepts.mdNew glossary of core entities and boundaries.
docs/overview/feature-matrix.mdNew capability/status matrix for Gateway vs Cloud.
docs/quickstart/self-hosted.mdNew quickstart for bootstrapping a self-hosted gateway.
docs/testing.mdRemoves legacy testing doc page.
docs/managed-mode.mdRemoves legacy managed-mode doc page.
docs/architecture.mdRemoves legacy architecture doc page.
docs/api-proxy.mdRemoves legacy proxy API doc page.
docs/api-admin.mdRemoves legacy admin API doc page.
crates/aisix-proxy/src/render.rsExtends rendered OpenAI message shape to flatten message.extra onto the wire (e.g., tool_calls).
crates/aisix-provider-anthropic/src/wire.rsImplements OpenAI-tools → Anthropic-tools translation and Anthropic tool_use → OpenAI tool_calls response mapping.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- `gemini`
- `deepseek`

Provider support is not identical across every endpoint. See [Provider Compatibility](../reference/provider-compatibility.md) for the current matrix.
Comment threaddocs/overview/deployment-modes.md Outdated
Comment on lines +66 to +73
See [AISIX Cloud Overview](../cloud/overview.md) and [Cloud Playground](../cloud/cloud-playground.md) for details.

## Related Pages

- [What Is AISIX AI Gateway](what-is-aisix-ai-gateway.md)
- [Core Concepts](core-concepts.md)
- [AISIX Cloud Overview](../cloud/overview.md)
- [AISIX Cloud Managed Data Plane Quickstart](../quickstart/aisix-cloud-managed-dp.md)
Comment threaddocs/quickstart/self-hosted.md Outdated
Comment on lines +88 to +94
```json
{
"status": "ok",
"models": 0,
"apikeys": 0,
"providers": 0
}
Comment on lines +14 to +21
// E2E: tool / function calling cross-provider translation. Per
// gateway docs `docs/api-proxy.md` §6 outbound-axis table:
//
// > Anthropic | /v1/messages | /v1/chat/completions (full translation)
// > | The Hub maps content blocks ↔ messages, **tool_use ↔ tool_calls**,
// > | system extraction, cache_control passthrough, stop_reason
// > | normalisation
//
Comment on lines +239 to +245
/// and `input` is a JSON object with the tool's arguments. Per
/// docs §6 outbound-axis table ("tool_use ↔ tool_calls"), the
/// gateway translates this into OpenAI's `tool_calls` shape on
/// the response so OpenAI-SDK callers (and every agent framework
/// built on that shape) work transparently against Anthropic
/// upstreams.
/// <https://docs.anthropic.com/en/api/messages#example-of-tool-use>
Comment on lines 30 to +33
pub struct RenderedMessage {
pub role: &'static str,
pub content: String,
/// Forward-compatible bag for OpenAI message-level fields the
"type": "function",
"function": {
"name": name,
"arguments": serde_json::to_string(input).unwrap_or_default(),
Comment threaddocs/index.md
Comment on lines +1 to +7
---
title: AISIX AI Gateway Documentation
description: Official documentation for AISIX AI Gateway and AISIX Cloud, including quickstarts, integration guides, configuration, operations, API reference, and roadmap.
sidebar_position: 1
---

AISIX AI Gateway is an AI gateway for platform engineers and AI agent developers who need a consistent way to route, govern, and observe LLM traffic across multiple providers. AISIX Cloud extends that gateway with a managed control plane and managed data-plane workflows.
CopilotAI review requested due to automatic review settings May 11, 2026 14:30

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 59 out of 59 changed files in this pull request and generated 3 comments.

Comment on lines +14 to +20
// E2E: tool / function calling cross-provider translation. Per
// gateway docs `docs/api-proxy.md` §6 outbound-axis table:
//
// > Anthropic | /v1/messages | /v1/chat/completions (full translation)
// > | The Hub maps content blocks ↔ messages, **tool_use ↔ tool_calls**,
// > | system extraction, cache_control passthrough, stop_reason
// > | normalisation
Comment on lines +95 to +97
| `request_body_limit_bytes` | request-body limit enforced by the proxy listener |
| `tls` | optional TLS certificate and key for the proxy listener |

"type": "function",
"function": {
"name": name,
"arguments": serde_json::to_string(input).unwrap_or_default(),
@moonmingmoonming changed the title docs: rebuild docs foundation with new overview and roadmapdocs: rebuild customer-facing docs across overview, config, cloud, ops, reference, and tutorialsMay 11, 2026
CopilotAI review requested due to automatic review settings May 12, 2026 00:08

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 69 out of 69 changed files in this pull request and generated 3 comments.

| Field | Description |
| --- | --- |
| `addr` | proxy listener address |
| `request_body_limit_bytes` | request-body limit enforced by the proxy listener |
Comment threaddocs/quickstart/openai-sdk.md Outdated
Comment on lines +33 to +53
```ts title="openai-sdk-example.ts"
import OpenAI from "openai";

const client = new OpenAI({
apiKey: process.env.AISIX_API_KEY,
baseURL: "http://127.0.0.1:3000/v1",
});

const response = await client.chat.completions.create({
model: "gpt-4o-prod",
messages: [{ role: "user", content: "Say hello from AISIX." }],
});

console.log(response.choices[0]?.message.content);
```

## Run It

```bash title="Run the OpenAI SDK example"
AISIX_API_KEY=sk-demo-caller node openai-sdk-example.ts
```
Comment threadREADME.md
- **Observability** — Prometheus `/metrics`; per-request structured access log; per-env `ObservabilityExporter` (`kind=otlp_http`) fan-out emitting one OTLP/HTTP-JSON GenAI span per chat completion to each enabled exporter (Langfuse, Honeycomb, Grafana Cloud, any OTLP receiver). Platform-level OTLP tracing of internal request-pipeline spans is scaffold ([#49]).

- **Telemetry events** — DP-side `UsageEvent` per request with cache_status, reasoning, provider-id detail, guardrail bypass reason, and `inbound_protocol` (`"openai"` / `"anthropic"`) so dashboard Logs disambiguate the SDK from the upstream `provider` label. Emitted by `/v1/chat/completions` and `/v1/messages` (passthrough-streaming and other endpoints land in a follow-up). Posted to cp-api in managed mode; consumed by `/admin/v1/spend` in standalone.
- **Telemetry events** — DP-side `UsageEvent` per request with cache_status, reasoning, provider-id detail, guardrail bypass reason, and `inbound_protocol` (`"openai"` / `"anthropic"`) so dashboard logs can disambiguate the client protocol from the upstream `provider` label. Emitted by `/v1/chat/completions` and `/v1/messages`; posted to cp-api in managed mode.
CopilotAI review requested due to automatic review settings May 14, 2026 01:09
@moonming
moonmingforce-pushed the docs-rebuild-batch-1 branch from 002db0d to 86b9a1fCompareMay 14, 2026 01:09

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

- quickstart/self-hosted: document the /livez liveness route and plain-text
body (per #257); add Cleanup
- quickstart/openai-sdk: switch to .mjs so \`node\` runs the example without
a TypeScript loader
- quickstart/first-model-first-key-first-request: add production-credentials
warning, 401/403 verification step using the real proxy error envelope,
Cleanup, and a per-provider api_base callout
- integration/openai-compatible-api: add mermaid diagram of the request
path; route list reflects the /livez rename
- integration/errors-and-retries: replace placeholder error.type strings
with the real ProxyError mapping; add 413 RequestTooLarge row; note the
admin {error_msg} envelope distinction
- configuration/provider-keys: warn about plaintext secret storage; replace
the inaccurate OpenAI api_base normalization claim with a per-provider
truth table (refs #270)
- operations/health-checks: rewrite for the /livez liveness contract plus
the /admin/v1/health per-model shape (per #256 + #257)
- reference/proxy-api-reference: /livez instead of /health in the route
list
- tutorials/build-a-virtual-model-with-failover: rewrite end-to-end against
routing-strategies-e2e (deliberately break primary, observe cooldown)
- tutorials/enable-response-caching: rewrite against cache-policy-e2e
(x-aisix-cache miss then hit, different prompt misses again)
- tutorials/add-keyword-guardrails: rewrite against guardrail-keyword-e2e
(422 content_filter; no-leak message contract per #203)
- tutorials/openai-client-to-anthropic-upstream: rewrite against
anthropic-upstream-e2e; document bare-host api_base for Anthropic
Every command, field, header, and error code was cross-checked against the
relevant crate or e2e test on this branch. No mock data; nothing speculative.
@moonming
moonmingforce-pushed the docs-rebuild-batch-1 branch from 86b9a1f to bc8c9d1CompareMay 14, 2026 01:19
@moonming
moonming merged commit f495f7e into mainMay 14, 2026
6 checks passed
This was referenced May 15, 2026
@jarvis9443
jarvis9443 deleted the docs-rebuild-batch-1 branch June 25, 2026 06:25
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@moonming
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

docs: rebuild customer-facing docs across overview, config, cloud, ops, reference, and tutorials - #249

Merged
moonming merged 7 commits into
mainfrom
docs-rebuild-batch-1
May 14, 2026
Merged

docs: rebuild customer-facing docs across overview, config, cloud, ops, reference, and tutorials#249
moonming merged 7 commits into
mainfrom
docs-rebuild-batch-1

Conversation

@moonming

@moonmingmoonming commented May 11, 2026

Copy link
Copy Markdown
Member

Summary

  • rebuild the stale docs/ set into a new customer-facing structure for AISIX AI Gateway and AISIX Cloud
  • document current, verified behavior only, and keep planned or incomplete capability framing in docs/roadmap.md
  • align README.md with the current docs entry points and runtime boundaries

Completed In This PR

  • foundation and orientation pages
  • self-hosted bootstrap and first-request quickstarts
  • gateway configuration docs
  • AISIX Cloud docs
  • operations docs
  • reference docs
  • scenario-driven tutorials
  • README alignment with current docs and runtime boundaries

Docs Added Or Rebuilt

  • docs/index.md
  • docs/roadmap.md
  • docs/overview/*
  • docs/quickstart/self-hosted.md
  • docs/quickstart/first-model-first-key-first-request.md
  • docs/integration/openai-compatible-api.md
  • docs/configuration/*
  • docs/cloud/*
  • docs/operations/*
  • docs/reference/*
  • docs/tutorials/*
  • README.md

Issue Coverage

Completed:

  • #245 landing page, overview, feature matrix, and roadmap
  • #248 gateway configuration docs
  • #242 operations docs
  • #244 reference docs
  • #247 AISIX Cloud docs
  • #241 scenario-driven tutorials
  • #201 admin docs gap for guardrails, cache policies, and observability exporters

Partially completed:

  • #243 quickstarts
    • completed: self-hosted, first-model-first-key-first-request
    • still missing: openai-sdk, anthropic-sdk, aisix-cloud-managed-dp
  • #246 integration guides
    • completed: openai-compatible-api
    • still missing: streaming, tool-calling, anthropic-messages, embeddings, responses, audio, images, rerank, passthrough, errors-and-retries

Notes

  • docs intentionally describe conservative, code-verified behavior where runtime boundaries are still uneven
  • standalone budget enforcement is documented as limited rather than fully active
  • Cloud playground is documented as preview-only and not representative of the managed DP path
  • managed Cloud bootstrap is documented around the current certificate-based flow

Summary by CodeRabbit

  • Documentation
    • Restructured documentation with new landing page and navigation framework featuring overview, configuration, operations, integration, quickstart, tutorial, and reference sections.
    • Added comprehensive guides for deployment modes, feature matrix, core concepts, and provider compatibility.
    • Expanded operational documentation covering health checks, production deployment, TLS/mTLS, upgrades, and troubleshooting.
    • Added quickstart guides and tutorials for common workflows including SDK integration and guardrail configuration.

Review Change Stack

CopilotAI review requested due to automatic review settings May 11, 2026 12:06
@coderabbitai

coderabbitaiBot commented May 11, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Large-scale documentation rebuild: removes legacy docs and adds a structured docs site with new overview, quickstarts, configuration, integrations, cloud operations, references, tutorials, and README adjustments. No source code changes.

Changes

Documentation Restructure

Layer / File(s)Summary
Removals and Cleanup
docs/api-*.md, docs/architecture.md, docs/managed-mode.md, docs/testing.md
Deletes deprecated admin/proxy API, architecture, managed mode, and testing docs.
Landing, Overview, README
docs/index.md, docs/overview/*, README.md
Adds new landing, product overviews, core concepts, deployment modes, feature matrix; updates README.
Quickstarts
docs/quickstart/*
Self-hosted bootstrap, first model/key/request, OpenAI and Anthropic SDKs, AISIX Cloud managed DP.
Configuration Guides
docs/configuration/*
Admin API, bootstrap, models, provider keys, API keys, routing/failover, rate limits, caching, budgets, guardrails, observability exporters, propagation.
Integrations
docs/integration/*
OpenAI-compatible proxy, embeddings, images, audio, rerank, responses, messages (Anthropic), streaming, tool-calling, passthrough, errors/retries.
Cloud
docs/cloud/*
Cloud overview, playground, orgs/environments, certificates/managed DP, resource projection, offline resilience, usage/billing, provider key rotation, Cloud vs self-hosted.
Operations
docs/operations/*
Health checks, metrics/logs, network/security, TLS/mTLS, production deployment, testing/verification, troubleshooting, upgrades/compatibility.
Reference
docs/reference/*
Proxy/admin API references, schemas, headers/error codes, provider compatibility, glossary.
Tutorials
docs/tutorials/*
Guides for guardrails, virtual model failover, caching, observability exporters, OpenAI client to Anthropic upstream, provider key rotation.

Sequence Diagram(s)

(skipped)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR rebuilds the repository documentation structure (new landing/overview/quickstart/roadmap pages and removal of legacy flat docs). It also introduces functional changes to the gateway’s cross-provider tool-calling translation (Anthropic ↔ OpenAI shapes) and adds an E2E test that pins the expected behavior.

Changes:

  • Replaces legacy docs pages with a new docs IA: landing page, overview pages, roadmap, and self-hosted quickstart.
  • Adds E2E coverage for OpenAI-tools → Anthropic-tools/tool_use → OpenAI-tool_calls translation.
  • Updates Rust proxy/provider code to forward tool_calls via message.extra and to translate OpenAI tools into Anthropic’s tools shape.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 8 comments.

Show a summary per file
FileDescription
tests/e2e/src/cases/tools-cross-provider-e2e.test.tsAdds a new E2E scenario covering cross-provider tool translation.
docs/index.mdNew docs landing page and navigation structure.
docs/roadmap.mdNew roadmap page to contain planned/incomplete capabilities.
docs/overview/what-is-aisix-ai-gateway.mdNew “what is” overview page.
docs/overview/deployment-modes.mdNew overview comparing self-hosted vs Cloud managed DP.
docs/overview/core-concepts.mdNew glossary of core entities and boundaries.
docs/overview/feature-matrix.mdNew capability/status matrix for Gateway vs Cloud.
docs/quickstart/self-hosted.mdNew quickstart for bootstrapping a self-hosted gateway.
docs/testing.mdRemoves legacy testing doc page.
docs/managed-mode.mdRemoves legacy managed-mode doc page.
docs/architecture.mdRemoves legacy architecture doc page.
docs/api-proxy.mdRemoves legacy proxy API doc page.
docs/api-admin.mdRemoves legacy admin API doc page.
crates/aisix-proxy/src/render.rsExtends rendered OpenAI message shape to flatten message.extra onto the wire (e.g., tool_calls).
crates/aisix-provider-anthropic/src/wire.rsImplements OpenAI-tools → Anthropic-tools translation and Anthropic tool_use → OpenAI tool_calls response mapping.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- `gemini`
- `deepseek`

Provider support is not identical across every endpoint. See [Provider Compatibility](../reference/provider-compatibility.md) for the current matrix.
Comment threaddocs/overview/deployment-modes.md Outdated
Comment on lines +66 to +73
See [AISIX Cloud Overview](../cloud/overview.md) and [Cloud Playground](../cloud/cloud-playground.md) for details.

## Related Pages

- [What Is AISIX AI Gateway](what-is-aisix-ai-gateway.md)
- [Core Concepts](core-concepts.md)
- [AISIX Cloud Overview](../cloud/overview.md)
- [AISIX Cloud Managed Data Plane Quickstart](../quickstart/aisix-cloud-managed-dp.md)
Comment threaddocs/quickstart/self-hosted.md Outdated
Comment on lines +88 to +94
```json
{
"status": "ok",
"models": 0,
"apikeys": 0,
"providers": 0
}
Comment on lines +14 to +21
// E2E: tool / function calling cross-provider translation. Per
// gateway docs `docs/api-proxy.md` §6 outbound-axis table:
//
// > Anthropic | /v1/messages | /v1/chat/completions (full translation)
// > | The Hub maps content blocks ↔ messages, **tool_use ↔ tool_calls**,
// > | system extraction, cache_control passthrough, stop_reason
// > | normalisation
//
Comment on lines +239 to +245
/// and `input` is a JSON object with the tool's arguments. Per
/// docs §6 outbound-axis table ("tool_use ↔ tool_calls"), the
/// gateway translates this into OpenAI's `tool_calls` shape on
/// the response so OpenAI-SDK callers (and every agent framework
/// built on that shape) work transparently against Anthropic
/// upstreams.
/// <https://docs.anthropic.com/en/api/messages#example-of-tool-use>
Comment on lines 30 to +33
pub struct RenderedMessage {
pub role: &'static str,
pub content: String,
/// Forward-compatible bag for OpenAI message-level fields the
"type": "function",
"function": {
"name": name,
"arguments": serde_json::to_string(input).unwrap_or_default(),
Comment threaddocs/index.md
Comment on lines +1 to +7
---
title: AISIX AI Gateway Documentation
description: Official documentation for AISIX AI Gateway and AISIX Cloud, including quickstarts, integration guides, configuration, operations, API reference, and roadmap.
sidebar_position: 1
---

AISIX AI Gateway is an AI gateway for platform engineers and AI agent developers who need a consistent way to route, govern, and observe LLM traffic across multiple providers. AISIX Cloud extends that gateway with a managed control plane and managed data-plane workflows.
CopilotAI review requested due to automatic review settings May 11, 2026 14:30

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 59 out of 59 changed files in this pull request and generated 3 comments.

Comment on lines +14 to +20
// E2E: tool / function calling cross-provider translation. Per
// gateway docs `docs/api-proxy.md` §6 outbound-axis table:
//
// > Anthropic | /v1/messages | /v1/chat/completions (full translation)
// > | The Hub maps content blocks ↔ messages, **tool_use ↔ tool_calls**,
// > | system extraction, cache_control passthrough, stop_reason
// > | normalisation
Comment on lines +95 to +97
| `request_body_limit_bytes` | request-body limit enforced by the proxy listener |
| `tls` | optional TLS certificate and key for the proxy listener |

"type": "function",
"function": {
"name": name,
"arguments": serde_json::to_string(input).unwrap_or_default(),
@moonmingmoonming changed the title docs: rebuild docs foundation with new overview and roadmapdocs: rebuild customer-facing docs across overview, config, cloud, ops, reference, and tutorialsMay 11, 2026
CopilotAI review requested due to automatic review settings May 12, 2026 00:08

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 69 out of 69 changed files in this pull request and generated 3 comments.

| Field | Description |
| --- | --- |
| `addr` | proxy listener address |
| `request_body_limit_bytes` | request-body limit enforced by the proxy listener |
Comment threaddocs/quickstart/openai-sdk.md Outdated
Comment on lines +33 to +53
```ts title="openai-sdk-example.ts"
import OpenAI from "openai";

const client = new OpenAI({
apiKey: process.env.AISIX_API_KEY,
baseURL: "http://127.0.0.1:3000/v1",
});

const response = await client.chat.completions.create({
model: "gpt-4o-prod",
messages: [{ role: "user", content: "Say hello from AISIX." }],
});

console.log(response.choices[0]?.message.content);
```

## Run It

```bash title="Run the OpenAI SDK example"
AISIX_API_KEY=sk-demo-caller node openai-sdk-example.ts
```
Comment threadREADME.md
- **Observability** — Prometheus `/metrics`; per-request structured access log; per-env `ObservabilityExporter` (`kind=otlp_http`) fan-out emitting one OTLP/HTTP-JSON GenAI span per chat completion to each enabled exporter (Langfuse, Honeycomb, Grafana Cloud, any OTLP receiver). Platform-level OTLP tracing of internal request-pipeline spans is scaffold ([#49]).

- **Telemetry events** — DP-side `UsageEvent` per request with cache_status, reasoning, provider-id detail, guardrail bypass reason, and `inbound_protocol` (`"openai"` / `"anthropic"`) so dashboard Logs disambiguate the SDK from the upstream `provider` label. Emitted by `/v1/chat/completions` and `/v1/messages` (passthrough-streaming and other endpoints land in a follow-up). Posted to cp-api in managed mode; consumed by `/admin/v1/spend` in standalone.
- **Telemetry events** — DP-side `UsageEvent` per request with cache_status, reasoning, provider-id detail, guardrail bypass reason, and `inbound_protocol` (`"openai"` / `"anthropic"`) so dashboard logs can disambiguate the client protocol from the upstream `provider` label. Emitted by `/v1/chat/completions` and `/v1/messages`; posted to cp-api in managed mode.
CopilotAI review requested due to automatic review settings May 14, 2026 01:09
@moonming
moonmingforce-pushed the docs-rebuild-batch-1 branch from 002db0d to 86b9a1fCompareMay 14, 2026 01:09

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

- quickstart/self-hosted: document the /livez liveness route and plain-text
body (per #257); add Cleanup
- quickstart/openai-sdk: switch to .mjs so \`node\` runs the example without
a TypeScript loader
- quickstart/first-model-first-key-first-request: add production-credentials
warning, 401/403 verification step using the real proxy error envelope,
Cleanup, and a per-provider api_base callout
- integration/openai-compatible-api: add mermaid diagram of the request
path; route list reflects the /livez rename
- integration/errors-and-retries: replace placeholder error.type strings
with the real ProxyError mapping; add 413 RequestTooLarge row; note the
admin {error_msg} envelope distinction
- configuration/provider-keys: warn about plaintext secret storage; replace
the inaccurate OpenAI api_base normalization claim with a per-provider
truth table (refs #270)
- operations/health-checks: rewrite for the /livez liveness contract plus
the /admin/v1/health per-model shape (per #256 + #257)
- reference/proxy-api-reference: /livez instead of /health in the route
list
- tutorials/build-a-virtual-model-with-failover: rewrite end-to-end against
routing-strategies-e2e (deliberately break primary, observe cooldown)
- tutorials/enable-response-caching: rewrite against cache-policy-e2e
(x-aisix-cache miss then hit, different prompt misses again)
- tutorials/add-keyword-guardrails: rewrite against guardrail-keyword-e2e
(422 content_filter; no-leak message contract per #203)
- tutorials/openai-client-to-anthropic-upstream: rewrite against
anthropic-upstream-e2e; document bare-host api_base for Anthropic
Every command, field, header, and error code was cross-checked against the
relevant crate or e2e test on this branch. No mock data; nothing speculative.
@moonming
moonmingforce-pushed the docs-rebuild-batch-1 branch from 86b9a1f to bc8c9d1CompareMay 14, 2026 01:19
@moonming
moonming merged commit f495f7e into mainMay 14, 2026
6 checks passed
This was referenced May 15, 2026
@jarvis9443
jarvis9443 deleted the docs-rebuild-batch-1 branch June 25, 2026 06:25
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@moonming
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

docs: rebuild customer-facing docs across overview, config, cloud, ops, reference, and tutorials - #249

Merged
moonming merged 7 commits into
mainfrom
docs-rebuild-batch-1
May 14, 2026
Merged

docs: rebuild customer-facing docs across overview, config, cloud, ops, reference, and tutorials#249
moonming merged 7 commits into
mainfrom
docs-rebuild-batch-1

Conversation

@moonming

@moonmingmoonming commented May 11, 2026

Copy link
Copy Markdown
Member

Summary

  • rebuild the stale docs/ set into a new customer-facing structure for AISIX AI Gateway and AISIX Cloud
  • document current, verified behavior only, and keep planned or incomplete capability framing in docs/roadmap.md
  • align README.md with the current docs entry points and runtime boundaries

Completed In This PR

  • foundation and orientation pages
  • self-hosted bootstrap and first-request quickstarts
  • gateway configuration docs
  • AISIX Cloud docs
  • operations docs
  • reference docs
  • scenario-driven tutorials
  • README alignment with current docs and runtime boundaries

Docs Added Or Rebuilt

  • docs/index.md
  • docs/roadmap.md
  • docs/overview/*
  • docs/quickstart/self-hosted.md
  • docs/quickstart/first-model-first-key-first-request.md
  • docs/integration/openai-compatible-api.md
  • docs/configuration/*
  • docs/cloud/*
  • docs/operations/*
  • docs/reference/*
  • docs/tutorials/*
  • README.md

Issue Coverage

Completed:

  • #245 landing page, overview, feature matrix, and roadmap
  • #248 gateway configuration docs
  • #242 operations docs
  • #244 reference docs
  • #247 AISIX Cloud docs
  • #241 scenario-driven tutorials
  • #201 admin docs gap for guardrails, cache policies, and observability exporters

Partially completed:

  • #243 quickstarts
    • completed: self-hosted, first-model-first-key-first-request
    • still missing: openai-sdk, anthropic-sdk, aisix-cloud-managed-dp
  • #246 integration guides
    • completed: openai-compatible-api
    • still missing: streaming, tool-calling, anthropic-messages, embeddings, responses, audio, images, rerank, passthrough, errors-and-retries

Notes

  • docs intentionally describe conservative, code-verified behavior where runtime boundaries are still uneven
  • standalone budget enforcement is documented as limited rather than fully active
  • Cloud playground is documented as preview-only and not representative of the managed DP path
  • managed Cloud bootstrap is documented around the current certificate-based flow

Summary by CodeRabbit

  • Documentation
    • Restructured documentation with new landing page and navigation framework featuring overview, configuration, operations, integration, quickstart, tutorial, and reference sections.
    • Added comprehensive guides for deployment modes, feature matrix, core concepts, and provider compatibility.
    • Expanded operational documentation covering health checks, production deployment, TLS/mTLS, upgrades, and troubleshooting.
    • Added quickstart guides and tutorials for common workflows including SDK integration and guardrail configuration.

Review Change Stack

CopilotAI review requested due to automatic review settings May 11, 2026 12:06
@coderabbitai

coderabbitaiBot commented May 11, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Large-scale documentation rebuild: removes legacy docs and adds a structured docs site with new overview, quickstarts, configuration, integrations, cloud operations, references, tutorials, and README adjustments. No source code changes.

Changes

Documentation Restructure

Layer / File(s)Summary
Removals and Cleanup
docs/api-*.md, docs/architecture.md, docs/managed-mode.md, docs/testing.md
Deletes deprecated admin/proxy API, architecture, managed mode, and testing docs.
Landing, Overview, README
docs/index.md, docs/overview/*, README.md
Adds new landing, product overviews, core concepts, deployment modes, feature matrix; updates README.
Quickstarts
docs/quickstart/*
Self-hosted bootstrap, first model/key/request, OpenAI and Anthropic SDKs, AISIX Cloud managed DP.
Configuration Guides
docs/configuration/*
Admin API, bootstrap, models, provider keys, API keys, routing/failover, rate limits, caching, budgets, guardrails, observability exporters, propagation.
Integrations
docs/integration/*
OpenAI-compatible proxy, embeddings, images, audio, rerank, responses, messages (Anthropic), streaming, tool-calling, passthrough, errors/retries.
Cloud
docs/cloud/*
Cloud overview, playground, orgs/environments, certificates/managed DP, resource projection, offline resilience, usage/billing, provider key rotation, Cloud vs self-hosted.
Operations
docs/operations/*
Health checks, metrics/logs, network/security, TLS/mTLS, production deployment, testing/verification, troubleshooting, upgrades/compatibility.
Reference
docs/reference/*
Proxy/admin API references, schemas, headers/error codes, provider compatibility, glossary.
Tutorials
docs/tutorials/*
Guides for guardrails, virtual model failover, caching, observability exporters, OpenAI client to Anthropic upstream, provider key rotation.

Sequence Diagram(s)

(skipped)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR rebuilds the repository documentation structure (new landing/overview/quickstart/roadmap pages and removal of legacy flat docs). It also introduces functional changes to the gateway’s cross-provider tool-calling translation (Anthropic ↔ OpenAI shapes) and adds an E2E test that pins the expected behavior.

Changes:

  • Replaces legacy docs pages with a new docs IA: landing page, overview pages, roadmap, and self-hosted quickstart.
  • Adds E2E coverage for OpenAI-tools → Anthropic-tools/tool_use → OpenAI-tool_calls translation.
  • Updates Rust proxy/provider code to forward tool_calls via message.extra and to translate OpenAI tools into Anthropic’s tools shape.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 8 comments.

Show a summary per file
FileDescription
tests/e2e/src/cases/tools-cross-provider-e2e.test.tsAdds a new E2E scenario covering cross-provider tool translation.
docs/index.mdNew docs landing page and navigation structure.
docs/roadmap.mdNew roadmap page to contain planned/incomplete capabilities.
docs/overview/what-is-aisix-ai-gateway.mdNew “what is” overview page.
docs/overview/deployment-modes.mdNew overview comparing self-hosted vs Cloud managed DP.
docs/overview/core-concepts.mdNew glossary of core entities and boundaries.
docs/overview/feature-matrix.mdNew capability/status matrix for Gateway vs Cloud.
docs/quickstart/self-hosted.mdNew quickstart for bootstrapping a self-hosted gateway.
docs/testing.mdRemoves legacy testing doc page.
docs/managed-mode.mdRemoves legacy managed-mode doc page.
docs/architecture.mdRemoves legacy architecture doc page.
docs/api-proxy.mdRemoves legacy proxy API doc page.
docs/api-admin.mdRemoves legacy admin API doc page.
crates/aisix-proxy/src/render.rsExtends rendered OpenAI message shape to flatten message.extra onto the wire (e.g., tool_calls).
crates/aisix-provider-anthropic/src/wire.rsImplements OpenAI-tools → Anthropic-tools translation and Anthropic tool_use → OpenAI tool_calls response mapping.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- `gemini`
- `deepseek`

Provider support is not identical across every endpoint. See [Provider Compatibility](../reference/provider-compatibility.md) for the current matrix.
Comment threaddocs/overview/deployment-modes.md Outdated
Comment on lines +66 to +73
See [AISIX Cloud Overview](../cloud/overview.md) and [Cloud Playground](../cloud/cloud-playground.md) for details.

## Related Pages

- [What Is AISIX AI Gateway](what-is-aisix-ai-gateway.md)
- [Core Concepts](core-concepts.md)
- [AISIX Cloud Overview](../cloud/overview.md)
- [AISIX Cloud Managed Data Plane Quickstart](../quickstart/aisix-cloud-managed-dp.md)
Comment threaddocs/quickstart/self-hosted.md Outdated
Comment on lines +88 to +94
```json
{
"status": "ok",
"models": 0,
"apikeys": 0,
"providers": 0
}
Comment on lines +14 to +21
// E2E: tool / function calling cross-provider translation. Per
// gateway docs `docs/api-proxy.md` §6 outbound-axis table:
//
// > Anthropic | /v1/messages | /v1/chat/completions (full translation)
// > | The Hub maps content blocks ↔ messages, **tool_use ↔ tool_calls**,
// > | system extraction, cache_control passthrough, stop_reason
// > | normalisation
//
Comment on lines +239 to +245
/// and `input` is a JSON object with the tool's arguments. Per
/// docs §6 outbound-axis table ("tool_use ↔ tool_calls"), the
/// gateway translates this into OpenAI's `tool_calls` shape on
/// the response so OpenAI-SDK callers (and every agent framework
/// built on that shape) work transparently against Anthropic
/// upstreams.
/// <https://docs.anthropic.com/en/api/messages#example-of-tool-use>
Comment on lines 30 to +33
pub struct RenderedMessage {
pub role: &'static str,
pub content: String,
/// Forward-compatible bag for OpenAI message-level fields the
"type": "function",
"function": {
"name": name,
"arguments": serde_json::to_string(input).unwrap_or_default(),
Comment threaddocs/index.md
Comment on lines +1 to +7
---
title: AISIX AI Gateway Documentation
description: Official documentation for AISIX AI Gateway and AISIX Cloud, including quickstarts, integration guides, configuration, operations, API reference, and roadmap.
sidebar_position: 1
---

AISIX AI Gateway is an AI gateway for platform engineers and AI agent developers who need a consistent way to route, govern, and observe LLM traffic across multiple providers. AISIX Cloud extends that gateway with a managed control plane and managed data-plane workflows.
CopilotAI review requested due to automatic review settings May 11, 2026 14:30

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 59 out of 59 changed files in this pull request and generated 3 comments.

Comment on lines +14 to +20
// E2E: tool / function calling cross-provider translation. Per
// gateway docs `docs/api-proxy.md` §6 outbound-axis table:
//
// > Anthropic | /v1/messages | /v1/chat/completions (full translation)
// > | The Hub maps content blocks ↔ messages, **tool_use ↔ tool_calls**,
// > | system extraction, cache_control passthrough, stop_reason
// > | normalisation
Comment on lines +95 to +97
| `request_body_limit_bytes` | request-body limit enforced by the proxy listener |
| `tls` | optional TLS certificate and key for the proxy listener |

"type": "function",
"function": {
"name": name,
"arguments": serde_json::to_string(input).unwrap_or_default(),
@moonmingmoonming changed the title docs: rebuild docs foundation with new overview and roadmapdocs: rebuild customer-facing docs across overview, config, cloud, ops, reference, and tutorialsMay 11, 2026
CopilotAI review requested due to automatic review settings May 12, 2026 00:08

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 69 out of 69 changed files in this pull request and generated 3 comments.

| Field | Description |
| --- | --- |
| `addr` | proxy listener address |
| `request_body_limit_bytes` | request-body limit enforced by the proxy listener |
Comment threaddocs/quickstart/openai-sdk.md Outdated
Comment on lines +33 to +53
```ts title="openai-sdk-example.ts"
import OpenAI from "openai";

const client = new OpenAI({
apiKey: process.env.AISIX_API_KEY,
baseURL: "http://127.0.0.1:3000/v1",
});

const response = await client.chat.completions.create({
model: "gpt-4o-prod",
messages: [{ role: "user", content: "Say hello from AISIX." }],
});

console.log(response.choices[0]?.message.content);
```

## Run It

```bash title="Run the OpenAI SDK example"
AISIX_API_KEY=sk-demo-caller node openai-sdk-example.ts
```
Comment threadREADME.md
- **Observability** — Prometheus `/metrics`; per-request structured access log; per-env `ObservabilityExporter` (`kind=otlp_http`) fan-out emitting one OTLP/HTTP-JSON GenAI span per chat completion to each enabled exporter (Langfuse, Honeycomb, Grafana Cloud, any OTLP receiver). Platform-level OTLP tracing of internal request-pipeline spans is scaffold ([#49]).

- **Telemetry events** — DP-side `UsageEvent` per request with cache_status, reasoning, provider-id detail, guardrail bypass reason, and `inbound_protocol` (`"openai"` / `"anthropic"`) so dashboard Logs disambiguate the SDK from the upstream `provider` label. Emitted by `/v1/chat/completions` and `/v1/messages` (passthrough-streaming and other endpoints land in a follow-up). Posted to cp-api in managed mode; consumed by `/admin/v1/spend` in standalone.
- **Telemetry events** — DP-side `UsageEvent` per request with cache_status, reasoning, provider-id detail, guardrail bypass reason, and `inbound_protocol` (`"openai"` / `"anthropic"`) so dashboard logs can disambiguate the client protocol from the upstream `provider` label. Emitted by `/v1/chat/completions` and `/v1/messages`; posted to cp-api in managed mode.
CopilotAI review requested due to automatic review settings May 14, 2026 01:09
@moonming
moonmingforce-pushed the docs-rebuild-batch-1 branch from 002db0d to 86b9a1fCompareMay 14, 2026 01:09

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

- quickstart/self-hosted: document the /livez liveness route and plain-text
body (per #257); add Cleanup
- quickstart/openai-sdk: switch to .mjs so \`node\` runs the example without
a TypeScript loader
- quickstart/first-model-first-key-first-request: add production-credentials
warning, 401/403 verification step using the real proxy error envelope,
Cleanup, and a per-provider api_base callout
- integration/openai-compatible-api: add mermaid diagram of the request
path; route list reflects the /livez rename
- integration/errors-and-retries: replace placeholder error.type strings
with the real ProxyError mapping; add 413 RequestTooLarge row; note the
admin {error_msg} envelope distinction
- configuration/provider-keys: warn about plaintext secret storage; replace
the inaccurate OpenAI api_base normalization claim with a per-provider
truth table (refs #270)
- operations/health-checks: rewrite for the /livez liveness contract plus
the /admin/v1/health per-model shape (per #256 + #257)
- reference/proxy-api-reference: /livez instead of /health in the route
list
- tutorials/build-a-virtual-model-with-failover: rewrite end-to-end against
routing-strategies-e2e (deliberately break primary, observe cooldown)
- tutorials/enable-response-caching: rewrite against cache-policy-e2e
(x-aisix-cache miss then hit, different prompt misses again)
- tutorials/add-keyword-guardrails: rewrite against guardrail-keyword-e2e
(422 content_filter; no-leak message contract per #203)
- tutorials/openai-client-to-anthropic-upstream: rewrite against
anthropic-upstream-e2e; document bare-host api_base for Anthropic
Every command, field, header, and error code was cross-checked against the
relevant crate or e2e test on this branch. No mock data; nothing speculative.
@moonming
moonmingforce-pushed the docs-rebuild-batch-1 branch from 86b9a1f to bc8c9d1CompareMay 14, 2026 01:19
@moonming
moonming merged commit f495f7e into mainMay 14, 2026
6 checks passed
This was referenced May 15, 2026
@jarvis9443
jarvis9443 deleted the docs-rebuild-batch-1 branch June 25, 2026 06:25
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@moonming
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

docs: rebuild customer-facing docs across overview, config, cloud, ops, reference, and tutorials - #249

Merged
moonming merged 7 commits into
mainfrom
docs-rebuild-batch-1
May 14, 2026
Merged

docs: rebuild customer-facing docs across overview, config, cloud, ops, reference, and tutorials#249
moonming merged 7 commits into
mainfrom
docs-rebuild-batch-1

Conversation

@moonming

@moonmingmoonming commented May 11, 2026

Copy link
Copy Markdown
Member

Summary

  • rebuild the stale docs/ set into a new customer-facing structure for AISIX AI Gateway and AISIX Cloud
  • document current, verified behavior only, and keep planned or incomplete capability framing in docs/roadmap.md
  • align README.md with the current docs entry points and runtime boundaries

Completed In This PR

  • foundation and orientation pages
  • self-hosted bootstrap and first-request quickstarts
  • gateway configuration docs
  • AISIX Cloud docs
  • operations docs
  • reference docs
  • scenario-driven tutorials
  • README alignment with current docs and runtime boundaries

Docs Added Or Rebuilt

  • docs/index.md
  • docs/roadmap.md
  • docs/overview/*
  • docs/quickstart/self-hosted.md
  • docs/quickstart/first-model-first-key-first-request.md
  • docs/integration/openai-compatible-api.md
  • docs/configuration/*
  • docs/cloud/*
  • docs/operations/*
  • docs/reference/*
  • docs/tutorials/*
  • README.md

Issue Coverage

Completed:

  • #245 landing page, overview, feature matrix, and roadmap
  • #248 gateway configuration docs
  • #242 operations docs
  • #244 reference docs
  • #247 AISIX Cloud docs
  • #241 scenario-driven tutorials
  • #201 admin docs gap for guardrails, cache policies, and observability exporters

Partially completed:

  • #243 quickstarts
    • completed: self-hosted, first-model-first-key-first-request
    • still missing: openai-sdk, anthropic-sdk, aisix-cloud-managed-dp
  • #246 integration guides
    • completed: openai-compatible-api
    • still missing: streaming, tool-calling, anthropic-messages, embeddings, responses, audio, images, rerank, passthrough, errors-and-retries

Notes

  • docs intentionally describe conservative, code-verified behavior where runtime boundaries are still uneven
  • standalone budget enforcement is documented as limited rather than fully active
  • Cloud playground is documented as preview-only and not representative of the managed DP path
  • managed Cloud bootstrap is documented around the current certificate-based flow

Summary by CodeRabbit

  • Documentation
    • Restructured documentation with new landing page and navigation framework featuring overview, configuration, operations, integration, quickstart, tutorial, and reference sections.
    • Added comprehensive guides for deployment modes, feature matrix, core concepts, and provider compatibility.
    • Expanded operational documentation covering health checks, production deployment, TLS/mTLS, upgrades, and troubleshooting.
    • Added quickstart guides and tutorials for common workflows including SDK integration and guardrail configuration.

Review Change Stack

CopilotAI review requested due to automatic review settings May 11, 2026 12:06
@coderabbitai

coderabbitaiBot commented May 11, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Large-scale documentation rebuild: removes legacy docs and adds a structured docs site with new overview, quickstarts, configuration, integrations, cloud operations, references, tutorials, and README adjustments. No source code changes.

Changes

Documentation Restructure

Layer / File(s)Summary
Removals and Cleanup
docs/api-*.md, docs/architecture.md, docs/managed-mode.md, docs/testing.md
Deletes deprecated admin/proxy API, architecture, managed mode, and testing docs.
Landing, Overview, README
docs/index.md, docs/overview/*, README.md
Adds new landing, product overviews, core concepts, deployment modes, feature matrix; updates README.
Quickstarts
docs/quickstart/*
Self-hosted bootstrap, first model/key/request, OpenAI and Anthropic SDKs, AISIX Cloud managed DP.
Configuration Guides
docs/configuration/*
Admin API, bootstrap, models, provider keys, API keys, routing/failover, rate limits, caching, budgets, guardrails, observability exporters, propagation.
Integrations
docs/integration/*
OpenAI-compatible proxy, embeddings, images, audio, rerank, responses, messages (Anthropic), streaming, tool-calling, passthrough, errors/retries.
Cloud
docs/cloud/*
Cloud overview, playground, orgs/environments, certificates/managed DP, resource projection, offline resilience, usage/billing, provider key rotation, Cloud vs self-hosted.
Operations
docs/operations/*
Health checks, metrics/logs, network/security, TLS/mTLS, production deployment, testing/verification, troubleshooting, upgrades/compatibility.
Reference
docs/reference/*
Proxy/admin API references, schemas, headers/error codes, provider compatibility, glossary.
Tutorials
docs/tutorials/*
Guides for guardrails, virtual model failover, caching, observability exporters, OpenAI client to Anthropic upstream, provider key rotation.

Sequence Diagram(s)

(skipped)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR rebuilds the repository documentation structure (new landing/overview/quickstart/roadmap pages and removal of legacy flat docs). It also introduces functional changes to the gateway’s cross-provider tool-calling translation (Anthropic ↔ OpenAI shapes) and adds an E2E test that pins the expected behavior.

Changes:

  • Replaces legacy docs pages with a new docs IA: landing page, overview pages, roadmap, and self-hosted quickstart.
  • Adds E2E coverage for OpenAI-tools → Anthropic-tools/tool_use → OpenAI-tool_calls translation.
  • Updates Rust proxy/provider code to forward tool_calls via message.extra and to translate OpenAI tools into Anthropic’s tools shape.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 8 comments.

Show a summary per file
FileDescription
tests/e2e/src/cases/tools-cross-provider-e2e.test.tsAdds a new E2E scenario covering cross-provider tool translation.
docs/index.mdNew docs landing page and navigation structure.
docs/roadmap.mdNew roadmap page to contain planned/incomplete capabilities.
docs/overview/what-is-aisix-ai-gateway.mdNew “what is” overview page.
docs/overview/deployment-modes.mdNew overview comparing self-hosted vs Cloud managed DP.
docs/overview/core-concepts.mdNew glossary of core entities and boundaries.
docs/overview/feature-matrix.mdNew capability/status matrix for Gateway vs Cloud.
docs/quickstart/self-hosted.mdNew quickstart for bootstrapping a self-hosted gateway.
docs/testing.mdRemoves legacy testing doc page.
docs/managed-mode.mdRemoves legacy managed-mode doc page.
docs/architecture.mdRemoves legacy architecture doc page.
docs/api-proxy.mdRemoves legacy proxy API doc page.
docs/api-admin.mdRemoves legacy admin API doc page.
crates/aisix-proxy/src/render.rsExtends rendered OpenAI message shape to flatten message.extra onto the wire (e.g., tool_calls).
crates/aisix-provider-anthropic/src/wire.rsImplements OpenAI-tools → Anthropic-tools translation and Anthropic tool_use → OpenAI tool_calls response mapping.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- `gemini`
- `deepseek`

Provider support is not identical across every endpoint. See [Provider Compatibility](../reference/provider-compatibility.md) for the current matrix.
Comment threaddocs/overview/deployment-modes.md Outdated
Comment on lines +66 to +73
See [AISIX Cloud Overview](../cloud/overview.md) and [Cloud Playground](../cloud/cloud-playground.md) for details.

## Related Pages

- [What Is AISIX AI Gateway](what-is-aisix-ai-gateway.md)
- [Core Concepts](core-concepts.md)
- [AISIX Cloud Overview](../cloud/overview.md)
- [AISIX Cloud Managed Data Plane Quickstart](../quickstart/aisix-cloud-managed-dp.md)
Comment threaddocs/quickstart/self-hosted.md Outdated
Comment on lines +88 to +94
```json
{
"status": "ok",
"models": 0,
"apikeys": 0,
"providers": 0
}
Comment on lines +14 to +21
// E2E: tool / function calling cross-provider translation. Per
// gateway docs `docs/api-proxy.md` §6 outbound-axis table:
//
// > Anthropic | /v1/messages | /v1/chat/completions (full translation)
// > | The Hub maps content blocks ↔ messages, **tool_use ↔ tool_calls**,
// > | system extraction, cache_control passthrough, stop_reason
// > | normalisation
//
Comment on lines +239 to +245
/// and `input` is a JSON object with the tool's arguments. Per
/// docs §6 outbound-axis table ("tool_use ↔ tool_calls"), the
/// gateway translates this into OpenAI's `tool_calls` shape on
/// the response so OpenAI-SDK callers (and every agent framework
/// built on that shape) work transparently against Anthropic
/// upstreams.
/// <https://docs.anthropic.com/en/api/messages#example-of-tool-use>
Comment on lines 30 to +33
pub struct RenderedMessage {
pub role: &'static str,
pub content: String,
/// Forward-compatible bag for OpenAI message-level fields the
"type": "function",
"function": {
"name": name,
"arguments": serde_json::to_string(input).unwrap_or_default(),
Comment threaddocs/index.md
Comment on lines +1 to +7
---
title: AISIX AI Gateway Documentation
description: Official documentation for AISIX AI Gateway and AISIX Cloud, including quickstarts, integration guides, configuration, operations, API reference, and roadmap.
sidebar_position: 1
---

AISIX AI Gateway is an AI gateway for platform engineers and AI agent developers who need a consistent way to route, govern, and observe LLM traffic across multiple providers. AISIX Cloud extends that gateway with a managed control plane and managed data-plane workflows.
CopilotAI review requested due to automatic review settings May 11, 2026 14:30

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 59 out of 59 changed files in this pull request and generated 3 comments.

Comment on lines +14 to +20
// E2E: tool / function calling cross-provider translation. Per
// gateway docs `docs/api-proxy.md` §6 outbound-axis table:
//
// > Anthropic | /v1/messages | /v1/chat/completions (full translation)
// > | The Hub maps content blocks ↔ messages, **tool_use ↔ tool_calls**,
// > | system extraction, cache_control passthrough, stop_reason
// > | normalisation
Comment on lines +95 to +97
| `request_body_limit_bytes` | request-body limit enforced by the proxy listener |
| `tls` | optional TLS certificate and key for the proxy listener |

"type": "function",
"function": {
"name": name,
"arguments": serde_json::to_string(input).unwrap_or_default(),
@moonmingmoonming changed the title docs: rebuild docs foundation with new overview and roadmapdocs: rebuild customer-facing docs across overview, config, cloud, ops, reference, and tutorialsMay 11, 2026
CopilotAI review requested due to automatic review settings May 12, 2026 00:08

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 69 out of 69 changed files in this pull request and generated 3 comments.

| Field | Description |
| --- | --- |
| `addr` | proxy listener address |
| `request_body_limit_bytes` | request-body limit enforced by the proxy listener |
Comment threaddocs/quickstart/openai-sdk.md Outdated
Comment on lines +33 to +53
```ts title="openai-sdk-example.ts"
import OpenAI from "openai";

const client = new OpenAI({
apiKey: process.env.AISIX_API_KEY,
baseURL: "http://127.0.0.1:3000/v1",
});

const response = await client.chat.completions.create({
model: "gpt-4o-prod",
messages: [{ role: "user", content: "Say hello from AISIX." }],
});

console.log(response.choices[0]?.message.content);
```

## Run It

```bash title="Run the OpenAI SDK example"
AISIX_API_KEY=sk-demo-caller node openai-sdk-example.ts
```
Comment threadREADME.md
- **Observability** — Prometheus `/metrics`; per-request structured access log; per-env `ObservabilityExporter` (`kind=otlp_http`) fan-out emitting one OTLP/HTTP-JSON GenAI span per chat completion to each enabled exporter (Langfuse, Honeycomb, Grafana Cloud, any OTLP receiver). Platform-level OTLP tracing of internal request-pipeline spans is scaffold ([#49]).

- **Telemetry events** — DP-side `UsageEvent` per request with cache_status, reasoning, provider-id detail, guardrail bypass reason, and `inbound_protocol` (`"openai"` / `"anthropic"`) so dashboard Logs disambiguate the SDK from the upstream `provider` label. Emitted by `/v1/chat/completions` and `/v1/messages` (passthrough-streaming and other endpoints land in a follow-up). Posted to cp-api in managed mode; consumed by `/admin/v1/spend` in standalone.
- **Telemetry events** — DP-side `UsageEvent` per request with cache_status, reasoning, provider-id detail, guardrail bypass reason, and `inbound_protocol` (`"openai"` / `"anthropic"`) so dashboard logs can disambiguate the client protocol from the upstream `provider` label. Emitted by `/v1/chat/completions` and `/v1/messages`; posted to cp-api in managed mode.
CopilotAI review requested due to automatic review settings May 14, 2026 01:09
@moonming
moonmingforce-pushed the docs-rebuild-batch-1 branch from 002db0d to 86b9a1fCompareMay 14, 2026 01:09

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

- quickstart/self-hosted: document the /livez liveness route and plain-text
body (per #257); add Cleanup
- quickstart/openai-sdk: switch to .mjs so \`node\` runs the example without
a TypeScript loader
- quickstart/first-model-first-key-first-request: add production-credentials
warning, 401/403 verification step using the real proxy error envelope,
Cleanup, and a per-provider api_base callout
- integration/openai-compatible-api: add mermaid diagram of the request
path; route list reflects the /livez rename
- integration/errors-and-retries: replace placeholder error.type strings
with the real ProxyError mapping; add 413 RequestTooLarge row; note the
admin {error_msg} envelope distinction
- configuration/provider-keys: warn about plaintext secret storage; replace
the inaccurate OpenAI api_base normalization claim with a per-provider
truth table (refs #270)
- operations/health-checks: rewrite for the /livez liveness contract plus
the /admin/v1/health per-model shape (per #256 + #257)
- reference/proxy-api-reference: /livez instead of /health in the route
list
- tutorials/build-a-virtual-model-with-failover: rewrite end-to-end against
routing-strategies-e2e (deliberately break primary, observe cooldown)
- tutorials/enable-response-caching: rewrite against cache-policy-e2e
(x-aisix-cache miss then hit, different prompt misses again)
- tutorials/add-keyword-guardrails: rewrite against guardrail-keyword-e2e
(422 content_filter; no-leak message contract per #203)
- tutorials/openai-client-to-anthropic-upstream: rewrite against
anthropic-upstream-e2e; document bare-host api_base for Anthropic
Every command, field, header, and error code was cross-checked against the
relevant crate or e2e test on this branch. No mock data; nothing speculative.
@moonming
moonmingforce-pushed the docs-rebuild-batch-1 branch from 86b9a1f to bc8c9d1CompareMay 14, 2026 01:19
@moonming
moonming merged commit f495f7e into mainMay 14, 2026
6 checks passed
This was referenced May 15, 2026
@jarvis9443
jarvis9443 deleted the docs-rebuild-batch-1 branch June 25, 2026 06:25
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@moonming
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

docs: rebuild customer-facing docs across overview, config, cloud, ops, reference, and tutorials - #249

Merged
moonming merged 7 commits into
mainfrom
docs-rebuild-batch-1
May 14, 2026
Merged

docs: rebuild customer-facing docs across overview, config, cloud, ops, reference, and tutorials#249
moonming merged 7 commits into
mainfrom
docs-rebuild-batch-1

Conversation

@moonming

@moonmingmoonming commented May 11, 2026

Copy link
Copy Markdown
Member

Summary

  • rebuild the stale docs/ set into a new customer-facing structure for AISIX AI Gateway and AISIX Cloud
  • document current, verified behavior only, and keep planned or incomplete capability framing in docs/roadmap.md
  • align README.md with the current docs entry points and runtime boundaries

Completed In This PR

  • foundation and orientation pages
  • self-hosted bootstrap and first-request quickstarts
  • gateway configuration docs
  • AISIX Cloud docs
  • operations docs
  • reference docs
  • scenario-driven tutorials
  • README alignment with current docs and runtime boundaries

Docs Added Or Rebuilt

  • docs/index.md
  • docs/roadmap.md
  • docs/overview/*
  • docs/quickstart/self-hosted.md
  • docs/quickstart/first-model-first-key-first-request.md
  • docs/integration/openai-compatible-api.md
  • docs/configuration/*
  • docs/cloud/*
  • docs/operations/*
  • docs/reference/*
  • docs/tutorials/*
  • README.md

Issue Coverage

Completed:

  • #245 landing page, overview, feature matrix, and roadmap
  • #248 gateway configuration docs
  • #242 operations docs
  • #244 reference docs
  • #247 AISIX Cloud docs
  • #241 scenario-driven tutorials
  • #201 admin docs gap for guardrails, cache policies, and observability exporters

Partially completed:

  • #243 quickstarts
    • completed: self-hosted, first-model-first-key-first-request
    • still missing: openai-sdk, anthropic-sdk, aisix-cloud-managed-dp
  • #246 integration guides
    • completed: openai-compatible-api
    • still missing: streaming, tool-calling, anthropic-messages, embeddings, responses, audio, images, rerank, passthrough, errors-and-retries

Notes

  • docs intentionally describe conservative, code-verified behavior where runtime boundaries are still uneven
  • standalone budget enforcement is documented as limited rather than fully active
  • Cloud playground is documented as preview-only and not representative of the managed DP path
  • managed Cloud bootstrap is documented around the current certificate-based flow

Summary by CodeRabbit

  • Documentation
    • Restructured documentation with new landing page and navigation framework featuring overview, configuration, operations, integration, quickstart, tutorial, and reference sections.
    • Added comprehensive guides for deployment modes, feature matrix, core concepts, and provider compatibility.
    • Expanded operational documentation covering health checks, production deployment, TLS/mTLS, upgrades, and troubleshooting.
    • Added quickstart guides and tutorials for common workflows including SDK integration and guardrail configuration.

Review Change Stack

CopilotAI review requested due to automatic review settings May 11, 2026 12:06
@coderabbitai

coderabbitaiBot commented May 11, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Large-scale documentation rebuild: removes legacy docs and adds a structured docs site with new overview, quickstarts, configuration, integrations, cloud operations, references, tutorials, and README adjustments. No source code changes.

Changes

Documentation Restructure

Layer / File(s)Summary
Removals and Cleanup
docs/api-*.md, docs/architecture.md, docs/managed-mode.md, docs/testing.md
Deletes deprecated admin/proxy API, architecture, managed mode, and testing docs.
Landing, Overview, README
docs/index.md, docs/overview/*, README.md
Adds new landing, product overviews, core concepts, deployment modes, feature matrix; updates README.
Quickstarts
docs/quickstart/*
Self-hosted bootstrap, first model/key/request, OpenAI and Anthropic SDKs, AISIX Cloud managed DP.
Configuration Guides
docs/configuration/*
Admin API, bootstrap, models, provider keys, API keys, routing/failover, rate limits, caching, budgets, guardrails, observability exporters, propagation.
Integrations
docs/integration/*
OpenAI-compatible proxy, embeddings, images, audio, rerank, responses, messages (Anthropic), streaming, tool-calling, passthrough, errors/retries.
Cloud
docs/cloud/*
Cloud overview, playground, orgs/environments, certificates/managed DP, resource projection, offline resilience, usage/billing, provider key rotation, Cloud vs self-hosted.
Operations
docs/operations/*
Health checks, metrics/logs, network/security, TLS/mTLS, production deployment, testing/verification, troubleshooting, upgrades/compatibility.
Reference
docs/reference/*
Proxy/admin API references, schemas, headers/error codes, provider compatibility, glossary.
Tutorials
docs/tutorials/*
Guides for guardrails, virtual model failover, caching, observability exporters, OpenAI client to Anthropic upstream, provider key rotation.

Sequence Diagram(s)

(skipped)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR rebuilds the repository documentation structure (new landing/overview/quickstart/roadmap pages and removal of legacy flat docs). It also introduces functional changes to the gateway’s cross-provider tool-calling translation (Anthropic ↔ OpenAI shapes) and adds an E2E test that pins the expected behavior.

Changes:

  • Replaces legacy docs pages with a new docs IA: landing page, overview pages, roadmap, and self-hosted quickstart.
  • Adds E2E coverage for OpenAI-tools → Anthropic-tools/tool_use → OpenAI-tool_calls translation.
  • Updates Rust proxy/provider code to forward tool_calls via message.extra and to translate OpenAI tools into Anthropic’s tools shape.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 8 comments.

Show a summary per file
FileDescription
tests/e2e/src/cases/tools-cross-provider-e2e.test.tsAdds a new E2E scenario covering cross-provider tool translation.
docs/index.mdNew docs landing page and navigation structure.
docs/roadmap.mdNew roadmap page to contain planned/incomplete capabilities.
docs/overview/what-is-aisix-ai-gateway.mdNew “what is” overview page.
docs/overview/deployment-modes.mdNew overview comparing self-hosted vs Cloud managed DP.
docs/overview/core-concepts.mdNew glossary of core entities and boundaries.
docs/overview/feature-matrix.mdNew capability/status matrix for Gateway vs Cloud.
docs/quickstart/self-hosted.mdNew quickstart for bootstrapping a self-hosted gateway.
docs/testing.mdRemoves legacy testing doc page.
docs/managed-mode.mdRemoves legacy managed-mode doc page.
docs/architecture.mdRemoves legacy architecture doc page.
docs/api-proxy.mdRemoves legacy proxy API doc page.
docs/api-admin.mdRemoves legacy admin API doc page.
crates/aisix-proxy/src/render.rsExtends rendered OpenAI message shape to flatten message.extra onto the wire (e.g., tool_calls).
crates/aisix-provider-anthropic/src/wire.rsImplements OpenAI-tools → Anthropic-tools translation and Anthropic tool_use → OpenAI tool_calls response mapping.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- `gemini`
- `deepseek`

Provider support is not identical across every endpoint. See [Provider Compatibility](../reference/provider-compatibility.md) for the current matrix.
Comment threaddocs/overview/deployment-modes.md Outdated
Comment on lines +66 to +73
See [AISIX Cloud Overview](../cloud/overview.md) and [Cloud Playground](../cloud/cloud-playground.md) for details.

## Related Pages

- [What Is AISIX AI Gateway](what-is-aisix-ai-gateway.md)
- [Core Concepts](core-concepts.md)
- [AISIX Cloud Overview](../cloud/overview.md)
- [AISIX Cloud Managed Data Plane Quickstart](../quickstart/aisix-cloud-managed-dp.md)
Comment threaddocs/quickstart/self-hosted.md Outdated
Comment on lines +88 to +94
```json
{
"status": "ok",
"models": 0,
"apikeys": 0,
"providers": 0
}
Comment on lines +14 to +21
// E2E: tool / function calling cross-provider translation. Per
// gateway docs `docs/api-proxy.md` §6 outbound-axis table:
//
// > Anthropic | /v1/messages | /v1/chat/completions (full translation)
// > | The Hub maps content blocks ↔ messages, **tool_use ↔ tool_calls**,
// > | system extraction, cache_control passthrough, stop_reason
// > | normalisation
//
Comment on lines +239 to +245
/// and `input` is a JSON object with the tool's arguments. Per
/// docs §6 outbound-axis table ("tool_use ↔ tool_calls"), the
/// gateway translates this into OpenAI's `tool_calls` shape on
/// the response so OpenAI-SDK callers (and every agent framework
/// built on that shape) work transparently against Anthropic
/// upstreams.
/// <https://docs.anthropic.com/en/api/messages#example-of-tool-use>
Comment on lines 30 to +33
pub struct RenderedMessage {
pub role: &'static str,
pub content: String,
/// Forward-compatible bag for OpenAI message-level fields the
"type": "function",
"function": {
"name": name,
"arguments": serde_json::to_string(input).unwrap_or_default(),
Comment threaddocs/index.md
Comment on lines +1 to +7
---
title: AISIX AI Gateway Documentation
description: Official documentation for AISIX AI Gateway and AISIX Cloud, including quickstarts, integration guides, configuration, operations, API reference, and roadmap.
sidebar_position: 1
---

AISIX AI Gateway is an AI gateway for platform engineers and AI agent developers who need a consistent way to route, govern, and observe LLM traffic across multiple providers. AISIX Cloud extends that gateway with a managed control plane and managed data-plane workflows.
CopilotAI review requested due to automatic review settings May 11, 2026 14:30

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 59 out of 59 changed files in this pull request and generated 3 comments.

Comment on lines +14 to +20
// E2E: tool / function calling cross-provider translation. Per
// gateway docs `docs/api-proxy.md` §6 outbound-axis table:
//
// > Anthropic | /v1/messages | /v1/chat/completions (full translation)
// > | The Hub maps content blocks ↔ messages, **tool_use ↔ tool_calls**,
// > | system extraction, cache_control passthrough, stop_reason
// > | normalisation
Comment on lines +95 to +97
| `request_body_limit_bytes` | request-body limit enforced by the proxy listener |
| `tls` | optional TLS certificate and key for the proxy listener |

"type": "function",
"function": {
"name": name,
"arguments": serde_json::to_string(input).unwrap_or_default(),
@moonmingmoonming changed the title docs: rebuild docs foundation with new overview and roadmapdocs: rebuild customer-facing docs across overview, config, cloud, ops, reference, and tutorialsMay 11, 2026
CopilotAI review requested due to automatic review settings May 12, 2026 00:08

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 69 out of 69 changed files in this pull request and generated 3 comments.

| Field | Description |
| --- | --- |
| `addr` | proxy listener address |
| `request_body_limit_bytes` | request-body limit enforced by the proxy listener |
Comment threaddocs/quickstart/openai-sdk.md Outdated
Comment on lines +33 to +53
```ts title="openai-sdk-example.ts"
import OpenAI from "openai";

const client = new OpenAI({
apiKey: process.env.AISIX_API_KEY,
baseURL: "http://127.0.0.1:3000/v1",
});

const response = await client.chat.completions.create({
model: "gpt-4o-prod",
messages: [{ role: "user", content: "Say hello from AISIX." }],
});

console.log(response.choices[0]?.message.content);
```

## Run It

```bash title="Run the OpenAI SDK example"
AISIX_API_KEY=sk-demo-caller node openai-sdk-example.ts
```
Comment threadREADME.md
- **Observability** — Prometheus `/metrics`; per-request structured access log; per-env `ObservabilityExporter` (`kind=otlp_http`) fan-out emitting one OTLP/HTTP-JSON GenAI span per chat completion to each enabled exporter (Langfuse, Honeycomb, Grafana Cloud, any OTLP receiver). Platform-level OTLP tracing of internal request-pipeline spans is scaffold ([#49]).

- **Telemetry events** — DP-side `UsageEvent` per request with cache_status, reasoning, provider-id detail, guardrail bypass reason, and `inbound_protocol` (`"openai"` / `"anthropic"`) so dashboard Logs disambiguate the SDK from the upstream `provider` label. Emitted by `/v1/chat/completions` and `/v1/messages` (passthrough-streaming and other endpoints land in a follow-up). Posted to cp-api in managed mode; consumed by `/admin/v1/spend` in standalone.
- **Telemetry events** — DP-side `UsageEvent` per request with cache_status, reasoning, provider-id detail, guardrail bypass reason, and `inbound_protocol` (`"openai"` / `"anthropic"`) so dashboard logs can disambiguate the client protocol from the upstream `provider` label. Emitted by `/v1/chat/completions` and `/v1/messages`; posted to cp-api in managed mode.
CopilotAI review requested due to automatic review settings May 14, 2026 01:09
@moonming
moonmingforce-pushed the docs-rebuild-batch-1 branch from 002db0d to 86b9a1fCompareMay 14, 2026 01:09

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

- quickstart/self-hosted: document the /livez liveness route and plain-text
body (per #257); add Cleanup
- quickstart/openai-sdk: switch to .mjs so \`node\` runs the example without
a TypeScript loader
- quickstart/first-model-first-key-first-request: add production-credentials
warning, 401/403 verification step using the real proxy error envelope,
Cleanup, and a per-provider api_base callout
- integration/openai-compatible-api: add mermaid diagram of the request
path; route list reflects the /livez rename
- integration/errors-and-retries: replace placeholder error.type strings
with the real ProxyError mapping; add 413 RequestTooLarge row; note the
admin {error_msg} envelope distinction
- configuration/provider-keys: warn about plaintext secret storage; replace
the inaccurate OpenAI api_base normalization claim with a per-provider
truth table (refs #270)
- operations/health-checks: rewrite for the /livez liveness contract plus
the /admin/v1/health per-model shape (per #256 + #257)
- reference/proxy-api-reference: /livez instead of /health in the route
list
- tutorials/build-a-virtual-model-with-failover: rewrite end-to-end against
routing-strategies-e2e (deliberately break primary, observe cooldown)
- tutorials/enable-response-caching: rewrite against cache-policy-e2e
(x-aisix-cache miss then hit, different prompt misses again)
- tutorials/add-keyword-guardrails: rewrite against guardrail-keyword-e2e
(422 content_filter; no-leak message contract per #203)
- tutorials/openai-client-to-anthropic-upstream: rewrite against
anthropic-upstream-e2e; document bare-host api_base for Anthropic
Every command, field, header, and error code was cross-checked against the
relevant crate or e2e test on this branch. No mock data; nothing speculative.
@moonming
moonmingforce-pushed the docs-rebuild-batch-1 branch from 86b9a1f to bc8c9d1CompareMay 14, 2026 01:19
@moonming
moonming merged commit f495f7e into mainMay 14, 2026
6 checks passed
This was referenced May 15, 2026
@jarvis9443
jarvis9443 deleted the docs-rebuild-batch-1 branch June 25, 2026 06:25
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@moonming
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

docs: rebuild customer-facing docs across overview, config, cloud, ops, reference, and tutorials - #249

Merged
moonming merged 7 commits into
mainfrom
docs-rebuild-batch-1
May 14, 2026
Merged

docs: rebuild customer-facing docs across overview, config, cloud, ops, reference, and tutorials#249
moonming merged 7 commits into
mainfrom
docs-rebuild-batch-1

Conversation

@moonming

@moonmingmoonming commented May 11, 2026

Copy link
Copy Markdown
Member

Summary

  • rebuild the stale docs/ set into a new customer-facing structure for AISIX AI Gateway and AISIX Cloud
  • document current, verified behavior only, and keep planned or incomplete capability framing in docs/roadmap.md
  • align README.md with the current docs entry points and runtime boundaries

Completed In This PR

  • foundation and orientation pages
  • self-hosted bootstrap and first-request quickstarts
  • gateway configuration docs
  • AISIX Cloud docs
  • operations docs
  • reference docs
  • scenario-driven tutorials
  • README alignment with current docs and runtime boundaries

Docs Added Or Rebuilt

  • docs/index.md
  • docs/roadmap.md
  • docs/overview/*
  • docs/quickstart/self-hosted.md
  • docs/quickstart/first-model-first-key-first-request.md
  • docs/integration/openai-compatible-api.md
  • docs/configuration/*
  • docs/cloud/*
  • docs/operations/*
  • docs/reference/*
  • docs/tutorials/*
  • README.md

Issue Coverage

Completed:

  • #245 landing page, overview, feature matrix, and roadmap
  • #248 gateway configuration docs
  • #242 operations docs
  • #244 reference docs
  • #247 AISIX Cloud docs
  • #241 scenario-driven tutorials
  • #201 admin docs gap for guardrails, cache policies, and observability exporters

Partially completed:

  • #243 quickstarts
    • completed: self-hosted, first-model-first-key-first-request
    • still missing: openai-sdk, anthropic-sdk, aisix-cloud-managed-dp
  • #246 integration guides
    • completed: openai-compatible-api
    • still missing: streaming, tool-calling, anthropic-messages, embeddings, responses, audio, images, rerank, passthrough, errors-and-retries

Notes

  • docs intentionally describe conservative, code-verified behavior where runtime boundaries are still uneven
  • standalone budget enforcement is documented as limited rather than fully active
  • Cloud playground is documented as preview-only and not representative of the managed DP path
  • managed Cloud bootstrap is documented around the current certificate-based flow

Summary by CodeRabbit

  • Documentation
    • Restructured documentation with new landing page and navigation framework featuring overview, configuration, operations, integration, quickstart, tutorial, and reference sections.
    • Added comprehensive guides for deployment modes, feature matrix, core concepts, and provider compatibility.
    • Expanded operational documentation covering health checks, production deployment, TLS/mTLS, upgrades, and troubleshooting.
    • Added quickstart guides and tutorials for common workflows including SDK integration and guardrail configuration.

Review Change Stack

CopilotAI review requested due to automatic review settings May 11, 2026 12:06
@coderabbitai

coderabbitaiBot commented May 11, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Large-scale documentation rebuild: removes legacy docs and adds a structured docs site with new overview, quickstarts, configuration, integrations, cloud operations, references, tutorials, and README adjustments. No source code changes.

Changes

Documentation Restructure

Layer / File(s)Summary
Removals and Cleanup
docs/api-*.md, docs/architecture.md, docs/managed-mode.md, docs/testing.md
Deletes deprecated admin/proxy API, architecture, managed mode, and testing docs.
Landing, Overview, README
docs/index.md, docs/overview/*, README.md
Adds new landing, product overviews, core concepts, deployment modes, feature matrix; updates README.
Quickstarts
docs/quickstart/*
Self-hosted bootstrap, first model/key/request, OpenAI and Anthropic SDKs, AISIX Cloud managed DP.
Configuration Guides
docs/configuration/*
Admin API, bootstrap, models, provider keys, API keys, routing/failover, rate limits, caching, budgets, guardrails, observability exporters, propagation.
Integrations
docs/integration/*
OpenAI-compatible proxy, embeddings, images, audio, rerank, responses, messages (Anthropic), streaming, tool-calling, passthrough, errors/retries.
Cloud
docs/cloud/*
Cloud overview, playground, orgs/environments, certificates/managed DP, resource projection, offline resilience, usage/billing, provider key rotation, Cloud vs self-hosted.
Operations
docs/operations/*
Health checks, metrics/logs, network/security, TLS/mTLS, production deployment, testing/verification, troubleshooting, upgrades/compatibility.
Reference
docs/reference/*
Proxy/admin API references, schemas, headers/error codes, provider compatibility, glossary.
Tutorials
docs/tutorials/*
Guides for guardrails, virtual model failover, caching, observability exporters, OpenAI client to Anthropic upstream, provider key rotation.

Sequence Diagram(s)

(skipped)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR rebuilds the repository documentation structure (new landing/overview/quickstart/roadmap pages and removal of legacy flat docs). It also introduces functional changes to the gateway’s cross-provider tool-calling translation (Anthropic ↔ OpenAI shapes) and adds an E2E test that pins the expected behavior.

Changes:

  • Replaces legacy docs pages with a new docs IA: landing page, overview pages, roadmap, and self-hosted quickstart.
  • Adds E2E coverage for OpenAI-tools → Anthropic-tools/tool_use → OpenAI-tool_calls translation.
  • Updates Rust proxy/provider code to forward tool_calls via message.extra and to translate OpenAI tools into Anthropic’s tools shape.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 8 comments.

Show a summary per file
FileDescription
tests/e2e/src/cases/tools-cross-provider-e2e.test.tsAdds a new E2E scenario covering cross-provider tool translation.
docs/index.mdNew docs landing page and navigation structure.
docs/roadmap.mdNew roadmap page to contain planned/incomplete capabilities.
docs/overview/what-is-aisix-ai-gateway.mdNew “what is” overview page.
docs/overview/deployment-modes.mdNew overview comparing self-hosted vs Cloud managed DP.
docs/overview/core-concepts.mdNew glossary of core entities and boundaries.
docs/overview/feature-matrix.mdNew capability/status matrix for Gateway vs Cloud.
docs/quickstart/self-hosted.mdNew quickstart for bootstrapping a self-hosted gateway.
docs/testing.mdRemoves legacy testing doc page.
docs/managed-mode.mdRemoves legacy managed-mode doc page.
docs/architecture.mdRemoves legacy architecture doc page.
docs/api-proxy.mdRemoves legacy proxy API doc page.
docs/api-admin.mdRemoves legacy admin API doc page.
crates/aisix-proxy/src/render.rsExtends rendered OpenAI message shape to flatten message.extra onto the wire (e.g., tool_calls).
crates/aisix-provider-anthropic/src/wire.rsImplements OpenAI-tools → Anthropic-tools translation and Anthropic tool_use → OpenAI tool_calls response mapping.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- `gemini`
- `deepseek`

Provider support is not identical across every endpoint. See [Provider Compatibility](../reference/provider-compatibility.md) for the current matrix.
Comment threaddocs/overview/deployment-modes.md Outdated
Comment on lines +66 to +73
See [AISIX Cloud Overview](../cloud/overview.md) and [Cloud Playground](../cloud/cloud-playground.md) for details.

## Related Pages

- [What Is AISIX AI Gateway](what-is-aisix-ai-gateway.md)
- [Core Concepts](core-concepts.md)
- [AISIX Cloud Overview](../cloud/overview.md)
- [AISIX Cloud Managed Data Plane Quickstart](../quickstart/aisix-cloud-managed-dp.md)
Comment threaddocs/quickstart/self-hosted.md Outdated
Comment on lines +88 to +94
```json
{
"status": "ok",
"models": 0,
"apikeys": 0,
"providers": 0
}
Comment on lines +14 to +21
// E2E: tool / function calling cross-provider translation. Per
// gateway docs `docs/api-proxy.md` §6 outbound-axis table:
//
// > Anthropic | /v1/messages | /v1/chat/completions (full translation)
// > | The Hub maps content blocks ↔ messages, **tool_use ↔ tool_calls**,
// > | system extraction, cache_control passthrough, stop_reason
// > | normalisation
//
Comment on lines +239 to +245
/// and `input` is a JSON object with the tool's arguments. Per
/// docs §6 outbound-axis table ("tool_use ↔ tool_calls"), the
/// gateway translates this into OpenAI's `tool_calls` shape on
/// the response so OpenAI-SDK callers (and every agent framework
/// built on that shape) work transparently against Anthropic
/// upstreams.
/// <https://docs.anthropic.com/en/api/messages#example-of-tool-use>
Comment on lines 30 to +33
pub struct RenderedMessage {
pub role: &'static str,
pub content: String,
/// Forward-compatible bag for OpenAI message-level fields the
"type": "function",
"function": {
"name": name,
"arguments": serde_json::to_string(input).unwrap_or_default(),
Comment threaddocs/index.md
Comment on lines +1 to +7
---
title: AISIX AI Gateway Documentation
description: Official documentation for AISIX AI Gateway and AISIX Cloud, including quickstarts, integration guides, configuration, operations, API reference, and roadmap.
sidebar_position: 1
---

AISIX AI Gateway is an AI gateway for platform engineers and AI agent developers who need a consistent way to route, govern, and observe LLM traffic across multiple providers. AISIX Cloud extends that gateway with a managed control plane and managed data-plane workflows.
CopilotAI review requested due to automatic review settings May 11, 2026 14:30

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 59 out of 59 changed files in this pull request and generated 3 comments.

Comment on lines +14 to +20
// E2E: tool / function calling cross-provider translation. Per
// gateway docs `docs/api-proxy.md` §6 outbound-axis table:
//
// > Anthropic | /v1/messages | /v1/chat/completions (full translation)
// > | The Hub maps content blocks ↔ messages, **tool_use ↔ tool_calls**,
// > | system extraction, cache_control passthrough, stop_reason
// > | normalisation
Comment on lines +95 to +97
| `request_body_limit_bytes` | request-body limit enforced by the proxy listener |
| `tls` | optional TLS certificate and key for the proxy listener |

"type": "function",
"function": {
"name": name,
"arguments": serde_json::to_string(input).unwrap_or_default(),
@moonmingmoonming changed the title docs: rebuild docs foundation with new overview and roadmapdocs: rebuild customer-facing docs across overview, config, cloud, ops, reference, and tutorialsMay 11, 2026
CopilotAI review requested due to automatic review settings May 12, 2026 00:08

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 69 out of 69 changed files in this pull request and generated 3 comments.

| Field | Description |
| --- | --- |
| `addr` | proxy listener address |
| `request_body_limit_bytes` | request-body limit enforced by the proxy listener |
Comment threaddocs/quickstart/openai-sdk.md Outdated
Comment on lines +33 to +53
```ts title="openai-sdk-example.ts"
import OpenAI from "openai";

const client = new OpenAI({
apiKey: process.env.AISIX_API_KEY,
baseURL: "http://127.0.0.1:3000/v1",
});

const response = await client.chat.completions.create({
model: "gpt-4o-prod",
messages: [{ role: "user", content: "Say hello from AISIX." }],
});

console.log(response.choices[0]?.message.content);
```

## Run It

```bash title="Run the OpenAI SDK example"
AISIX_API_KEY=sk-demo-caller node openai-sdk-example.ts
```
Comment threadREADME.md
- **Observability** — Prometheus `/metrics`; per-request structured access log; per-env `ObservabilityExporter` (`kind=otlp_http`) fan-out emitting one OTLP/HTTP-JSON GenAI span per chat completion to each enabled exporter (Langfuse, Honeycomb, Grafana Cloud, any OTLP receiver). Platform-level OTLP tracing of internal request-pipeline spans is scaffold ([#49]).

- **Telemetry events** — DP-side `UsageEvent` per request with cache_status, reasoning, provider-id detail, guardrail bypass reason, and `inbound_protocol` (`"openai"` / `"anthropic"`) so dashboard Logs disambiguate the SDK from the upstream `provider` label. Emitted by `/v1/chat/completions` and `/v1/messages` (passthrough-streaming and other endpoints land in a follow-up). Posted to cp-api in managed mode; consumed by `/admin/v1/spend` in standalone.
- **Telemetry events** — DP-side `UsageEvent` per request with cache_status, reasoning, provider-id detail, guardrail bypass reason, and `inbound_protocol` (`"openai"` / `"anthropic"`) so dashboard logs can disambiguate the client protocol from the upstream `provider` label. Emitted by `/v1/chat/completions` and `/v1/messages`; posted to cp-api in managed mode.
CopilotAI review requested due to automatic review settings May 14, 2026 01:09
@moonming
moonmingforce-pushed the docs-rebuild-batch-1 branch from 002db0d to 86b9a1fCompareMay 14, 2026 01:09

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

- quickstart/self-hosted: document the /livez liveness route and plain-text
body (per #257); add Cleanup
- quickstart/openai-sdk: switch to .mjs so \`node\` runs the example without
a TypeScript loader
- quickstart/first-model-first-key-first-request: add production-credentials
warning, 401/403 verification step using the real proxy error envelope,
Cleanup, and a per-provider api_base callout
- integration/openai-compatible-api: add mermaid diagram of the request
path; route list reflects the /livez rename
- integration/errors-and-retries: replace placeholder error.type strings
with the real ProxyError mapping; add 413 RequestTooLarge row; note the
admin {error_msg} envelope distinction
- configuration/provider-keys: warn about plaintext secret storage; replace
the inaccurate OpenAI api_base normalization claim with a per-provider
truth table (refs #270)
- operations/health-checks: rewrite for the /livez liveness contract plus
the /admin/v1/health per-model shape (per #256 + #257)
- reference/proxy-api-reference: /livez instead of /health in the route
list
- tutorials/build-a-virtual-model-with-failover: rewrite end-to-end against
routing-strategies-e2e (deliberately break primary, observe cooldown)
- tutorials/enable-response-caching: rewrite against cache-policy-e2e
(x-aisix-cache miss then hit, different prompt misses again)
- tutorials/add-keyword-guardrails: rewrite against guardrail-keyword-e2e
(422 content_filter; no-leak message contract per #203)
- tutorials/openai-client-to-anthropic-upstream: rewrite against
anthropic-upstream-e2e; document bare-host api_base for Anthropic
Every command, field, header, and error code was cross-checked against the
relevant crate or e2e test on this branch. No mock data; nothing speculative.
@moonming
moonmingforce-pushed the docs-rebuild-batch-1 branch from 86b9a1f to bc8c9d1CompareMay 14, 2026 01:19
@moonming
moonming merged commit f495f7e into mainMay 14, 2026
6 checks passed
This was referenced May 15, 2026
@jarvis9443
jarvis9443 deleted the docs-rebuild-batch-1 branch June 25, 2026 06:25
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@moonming