ollama/docs
ParthSareen f760ae1fdd api: add Anthropic Messages API compatibility layer
Add middleware to support the Anthropic Messages API format at /v1/messages.
This enables tools like Claude Code to work with Ollama models through the
Anthropic API interface.

Features:
- Request/response transformation between Anthropic and internal formats
- Streaming support with SSE events (message_start, content_block_delta, etc.)
- Tool calling support (tool_use and tool_result content blocks)
- Thinking/extended thinking block support
- Image content block support (base64)
- System prompt handling
- Multi-turn conversation support
- Proper stop_reason mapping (end_turn, max_tokens, tool_use)
- Error responses in Anthropic format

New files:
- anthropic/anthropic.go: Types and transformation functions
- middleware/anthropic.go: Request/response middleware
2026-01-05 19:19:34 -08:00
..
api api: add Anthropic Messages API compatibility layer 2026-01-05 19:19:34 -08:00
capabilities docs/capabilities/vision: fix curl related code snippet (#13615) 2026-01-03 17:27:46 -05:00
images docs: add docs for docs.ollama.com (#12805) 2025-10-28 13:18:48 -07:00
integrations docs: fix typo in vscode.mdx (#13116) 2025-11-18 13:18:42 -08:00
tools/extract-examples docs: add docs for v1/responses and rework openai compat section (#13416) 2025-12-11 17:39:40 -08:00
README.md docs: fix 404 link to modelfile documentation (#12996) 2025-11-07 10:06:46 -08:00
api.md docs: fix tool name mismatch and trailing commas in api.md example (#13559) 2026-01-03 02:14:53 -05:00
cli.mdx embeddings: added embedding command for cl (#12795) 2025-11-05 11:58:03 -08:00
cloud.mdx docs: link to ollama.com instead of hardcoding list of cloud models (#13110) 2025-11-16 20:56:09 -08:00
context-length.mdx docs: add docs for docs.ollama.com (#12805) 2025-10-28 13:18:48 -07:00
development.md Add Vulkan GPU support instructions in development.md (#13265) 2025-12-02 13:37:32 -08:00
docker.mdx Enable Vulkan with a temporary opt-in setting (#12931) 2025-11-12 08:40:38 -08:00
docs.json docs: rename api-reference.md back to api.md since redirect stopped working (#13056) 2025-11-11 15:53:06 -08:00
examples.md docs: update readme and links (#12809) 2025-10-28 16:20:02 -07:00
faq.mdx docs: fix broken .md links and render issues (#13550) 2025-12-23 12:44:55 -05:00
favicon-dark.svg docs: add docs for docs.ollama.com (#12805) 2025-10-28 13:18:48 -07:00
favicon.svg docs: add docs for docs.ollama.com (#12805) 2025-10-28 13:18:48 -07:00
gpu.mdx docs: fix broken .md links and render issues (#13550) 2025-12-23 12:44:55 -05:00
import.mdx docs: add docs for docs.ollama.com (#12805) 2025-10-28 13:18:48 -07:00
index.mdx docs: add docs for docs.ollama.com (#12805) 2025-10-28 13:18:48 -07:00
linux.mdx docs: add docs for docs.ollama.com (#12805) 2025-10-28 13:18:48 -07:00
logo.svg docs: add docs for docs.ollama.com (#12805) 2025-10-28 13:18:48 -07:00
macos.mdx docs: update readme and links (#12809) 2025-10-28 16:20:02 -07:00
modelfile.mdx add REQUIRES command to Modelfile (#13361) 2025-12-18 13:21:29 -08:00
ollama-logo.svg docs: add docs for docs.ollama.com (#12805) 2025-10-28 13:18:48 -07:00
ollama.png docs: add docs for docs.ollama.com (#12805) 2025-10-28 13:18:48 -07:00
openapi.yaml docs: add logprobs to openapi (#13090) 2025-11-14 14:14:58 -08:00
quickstart.mdx docs: add docs for docs.ollama.com (#12805) 2025-10-28 13:18:48 -07:00
styling.css docs: add docs for docs.ollama.com (#12805) 2025-10-28 13:18:48 -07:00
template.mdx docs: add docs for docs.ollama.com (#12805) 2025-10-28 13:18:48 -07:00
troubleshooting.md docs: add new cloud model + fix openai redirect (#12812) 2025-10-28 19:09:07 -07:00
troubleshooting.mdx docs: fix broken .md links and render issues (#13550) 2025-12-23 12:44:55 -05:00
windows.mdx docs: update readme and links (#12809) 2025-10-28 16:20:02 -07:00