feat(executors): Improved UI components for displaying provider limits and usage statistics in the dashboard.

This commit is contained in:
decolua
2026-02-05 18:38:50 +07:00
parent 249fc28c49
commit 32aefe5a76
21 changed files with 1113 additions and 311 deletions

View File

@@ -71,11 +71,6 @@ export function translateRequest(sourceFormat, targetFormat, model, body, stream
}
}
// Step 1.5: Filter to clean OpenAI format (only when target is OpenAI)
if (targetFormat === FORMATS.OPENAI) {
result = filterToOpenAIFormat(result);
}
// Step 2: openai -> target (if target is not openai)
if (targetFormat !== FORMATS.OPENAI) {
const fromOpenAI = requestRegistry.get(`${FORMATS.OPENAI}:${targetFormat}`);
@@ -85,6 +80,12 @@ export function translateRequest(sourceFormat, targetFormat, model, body, stream
}
}
// Always normalize to clean OpenAI format when target is OpenAI
// This handles hybrid requests (e.g., OpenAI messages + Claude tools)
if (targetFormat === FORMATS.OPENAI) {
result = filterToOpenAIFormat(result);
}
// Final step: prepare request for Claude format endpoints
if (targetFormat === FORMATS.CLAUDE) {
result = prepareClaudeRequest(result, provider);