Skip to content

Commit 3a47ddd

Browse files
committed
feat(server): add Anthropic Messages API endpoints
Add /v1/messages and a checks endpoint that accept Anthropic Messages API format requests, with request/response schemas and SSE streaming that emits tool_use blocks. Stream tool calls through the handler in _stream_llm_call so the SSE formatter can surface them. Add the optional anthropic dependency to the server, all, and test_integration extras, since the server schemas depend on the anthropic SDK types. Document the endpoints: add an "Anthropic Messages" server guide page, add both endpoints to the OpenAPI spec (fern/openapi.yml) and the docs navigation and API reference layout. Signed-off-by: Rob Geada <rob@geada.net>
1 parent 358b32a commit 3a47ddd

12 files changed

Lines changed: 5384 additions & 3452 deletions

File tree

docs/index.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,9 @@ navigation:
449449
- page: Chat Completions
450450
path: run-rails/using-fastapi-server/chat-with-guardrailed-model.mdx
451451
slug: chat-with-guardrailed-model
452+
- page: Anthropic Messages
453+
path: run-rails/using-fastapi-server/chat-with-anthropic-model.mdx
454+
slug: chat-with-anthropic-model
452455
- page: List Configurations
453456
path: run-rails/using-fastapi-server/list-guardrail-configs.mdx
454457
slug: list-guardrail-configs
@@ -592,6 +595,13 @@ navigation:
592595
- endpoint: POST /v1/chat/completions
593596
title: Create Chat Completion
594597
slug: chat-completions
598+
- messages:
599+
- endpoint: POST /v1/messages
600+
title: Create Anthropic Message
601+
slug: create-message
602+
- endpoint: POST /v1/messages/checks
603+
title: Check Anthropic Messages
604+
slug: check-messages
595605
- models:
596606
- endpoint: GET /v1/models
597607
title: List Models

0 commit comments

Comments
 (0)