mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 13:38:31 +00:00
Fix AG, Kiro, Xiaomi Provider
This commit is contained in:
@@ -30,6 +30,7 @@ import {
|
||||
isThinkingEnabled,
|
||||
buildThinkingSystemPrefix,
|
||||
KIRO_AGENTIC_SYSTEM_PROMPT,
|
||||
resolveDefaultProfileArn,
|
||||
} from "../../config/kiroConstants.js";
|
||||
import { DEFAULT_IMAGE_MIME } from "../schema/index.js";
|
||||
import { ROLE, CLAUDE_BLOCK } from "../schema/index.js";
|
||||
@@ -397,7 +398,11 @@ export function claudeToKiroRequest(model, body, stream, credentials) {
|
||||
reconcileOrphanedToolResults(history, currentMessage);
|
||||
}
|
||||
|
||||
const profileArn = credentials?.providerSpecificData?.profileArn || "";
|
||||
// API-key auth must never use the shared default ARN (403); OAuth/social fall back to it.
|
||||
const authMethod = credentials?.providerSpecificData?.authMethod;
|
||||
const profileArn = authMethod === "api_key"
|
||||
? (credentials?.providerSpecificData?.profileArn || "")
|
||||
: (credentials?.providerSpecificData?.profileArn || resolveDefaultProfileArn(authMethod));
|
||||
|
||||
let finalContent = currentMessage?.userInputMessage?.content || "";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user