Skip to content

Commit 2aab7d7

Browse files
committed
feat: Add Anthropic compatible endpoints
1 parent 101f422 commit 2aab7d7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/server.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ server.get("/", (c) => c.text("Server running"))
1717
server.route("/chat/completions", completionRoutes)
1818
server.route("/models", modelRoutes)
1919
server.route("/embeddings", embeddingRoutes)
20-
server.route("/messages", messageRoutes)
2120

2221
// Compatibility with tools that expect v1/ prefix
2322
server.route("/v1/chat/completions", completionRoutes)
2423
server.route("/v1/models", modelRoutes)
2524
server.route("/v1/embeddings", embeddingRoutes)
25+
26+
// Anthropic compatible endpoints
2627
server.route("/v1/messages", messageRoutes)
28+
server.post("/v1/messages/count_tokens", (c) => c.json({ input_tokens: 1 }))

0 commit comments

Comments
 (0)