mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 20:00:47 +00:00
Remove Docker publish workflow and update error handling in various modules
- Added handling for HTTP_STATUS.NOT_ACCEPTABLE in error types and messages. - Enhanced the `prepareClaudeRequest` function to filter built-in tools for non-Anthropic providers and clean up empty tool arrays. - Updated the `openaiToClaudeRequest` function to handle built-in tools more effectively and ensure proper tool conversion. - Improved the `claudeToOpenAIResponse` function to skip processing for built-in server tool blocks. - Refined error message handling in the `parseUpstreamError` function to ensure meaningful output. - Adjusted command checks for tool installations across various settings routes to use `command -v` for better compatibility.
This commit is contained in:
@@ -20,7 +20,7 @@ const getClaudeSettingsPath = () => {
|
||||
const checkClaudeInstalled = async () => {
|
||||
try {
|
||||
const isWindows = os.platform() === "win32";
|
||||
const command = isWindows ? "where claude" : "which claude";
|
||||
const command = isWindows ? "where claude" : "command -v claude";
|
||||
await execAsync(command);
|
||||
return true;
|
||||
} catch {
|
||||
|
||||
@@ -75,7 +75,7 @@ const toToml = (parsed) => {
|
||||
const checkCodexInstalled = async () => {
|
||||
try {
|
||||
const isWindows = os.platform() === "win32";
|
||||
const command = isWindows ? "where codex" : "which codex";
|
||||
const command = isWindows ? "where codex" : "command -v codex";
|
||||
await execAsync(command);
|
||||
return true;
|
||||
} catch {
|
||||
|
||||
@@ -16,7 +16,7 @@ const getDroidSettingsPath = () => path.join(getDroidDir(), "settings.json");
|
||||
const checkDroidInstalled = async () => {
|
||||
try {
|
||||
const isWindows = os.platform() === "win32";
|
||||
const command = isWindows ? "where droid" : "which droid";
|
||||
const command = isWindows ? "where droid" : "command -v droid";
|
||||
await execAsync(command);
|
||||
return true;
|
||||
} catch {
|
||||
|
||||
@@ -16,7 +16,7 @@ const getOpenClawSettingsPath = () => path.join(getOpenClawDir(), "openclaw.json
|
||||
const checkOpenClawInstalled = async () => {
|
||||
try {
|
||||
const isWindows = os.platform() === "win32";
|
||||
const command = isWindows ? "where openclaw" : "which openclaw";
|
||||
const command = isWindows ? "where openclaw" : "command -v openclaw";
|
||||
await execAsync(command);
|
||||
return true;
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user