mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-23 04:09:49 +00:00
- Enhance passthrough function to support response inspection
- Add cursor tool configuration and update related components
This commit is contained in:
@@ -5,12 +5,14 @@ const TARGET_HOSTS = [
|
||||
"cloudcode-pa.googleapis.com",
|
||||
"api.individual.githubcopilot.com",
|
||||
"q.us-east-1.amazonaws.com",
|
||||
"api2.cursor.sh",
|
||||
];
|
||||
|
||||
const URL_PATTERNS = {
|
||||
antigravity: [":generateContent", ":streamGenerateContent"],
|
||||
copilot: ["/chat/completions", "/v1/messages", "/responses"],
|
||||
kiro: ["/generateAssistantResponse"],
|
||||
cursor: ["/BidiAppend", "/RunSSE", "/RunPoll", "/Run"],
|
||||
};
|
||||
|
||||
function getToolForHost(host) {
|
||||
@@ -18,6 +20,7 @@ function getToolForHost(host) {
|
||||
if (h === "api.individual.githubcopilot.com") return "copilot";
|
||||
if (h === "daily-cloudcode-pa.googleapis.com" || h === "cloudcode-pa.googleapis.com") return "antigravity";
|
||||
if (h === "q.us-east-1.amazonaws.com") return "kiro";
|
||||
if (h === "api2.cursor.sh") return "cursor";
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user