@musistudio/claude-code-router 1.0.56 → 1.0.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/README_zh.md +2 -0
- package/dist/cli.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
package/README_zh.md
CHANGED
package/dist/cli.js
CHANGED
|
@@ -67693,7 +67693,7 @@ var require_package3 = __commonJS({
|
|
|
67693
67693
|
"package.json"(exports2, module2) {
|
|
67694
67694
|
module2.exports = {
|
|
67695
67695
|
name: "@musistudio/claude-code-router",
|
|
67696
|
-
version: "1.0.
|
|
67696
|
+
version: "1.0.57",
|
|
67697
67697
|
description: "Use Claude Code without an Anthropics account and route it to another LLM provider",
|
|
67698
67698
|
bin: {
|
|
67699
67699
|
ccr: "dist/cli.js"
|
|
@@ -83330,7 +83330,7 @@ async function run(options = {}) {
|
|
|
83330
83330
|
});
|
|
83331
83331
|
});
|
|
83332
83332
|
server.addHook("preHandler", async (req, reply) => {
|
|
83333
|
-
if (req.url.startsWith("/v1/messages")) {
|
|
83333
|
+
if (req.url.startsWith("/v1/messages") && !req.url.startsWith("/v1/messages/count_tokens")) {
|
|
83334
83334
|
const useAgents = [];
|
|
83335
83335
|
for (const agent of agents_default.getAllAgents()) {
|
|
83336
83336
|
if (agent.shouldHandle(req, config)) {
|
|
@@ -83363,7 +83363,7 @@ async function run(options = {}) {
|
|
|
83363
83363
|
event.emit("onError", request, reply, error);
|
|
83364
83364
|
});
|
|
83365
83365
|
server.addHook("onSend", (req, reply, payload, done) => {
|
|
83366
|
-
if (req.sessionId && req.url.startsWith("/v1/messages")) {
|
|
83366
|
+
if (req.sessionId && req.url.startsWith("/v1/messages") && !req.url.startsWith("/v1/messages/count_tokens")) {
|
|
83367
83367
|
if (payload instanceof ReadableStream) {
|
|
83368
83368
|
if (req.agents) {
|
|
83369
83369
|
const abortController = new AbortController();
|