chore(kiro): 更新默认模型名称并添加调试日志
- 将默认模型名称从 claude-sonnet-4-20250514 更新为 claude-sonnet-4-5 - 在 generateContent 和 generateContentStream 方法中添加模型调用日志 - 便于调试和追踪实际使用的模型版本
This commit is contained in:
parent
dfe7ce914e
commit
52417dd805
1 changed files with 4 additions and 2 deletions
|
|
@ -10,7 +10,7 @@ const KIRO_CONSTANTS = {
|
|||
REFRESH_IDC_URL: 'https://oidc.{{region}}.amazonaws.com/token',
|
||||
BASE_URL: 'https://codewhisperer.{{region}}.amazonaws.com/generateAssistantResponse',
|
||||
AMAZON_Q_URL: 'https://codewhisperer.{{region}}.amazonaws.com/SendMessageStreaming',
|
||||
DEFAULT_MODEL_NAME: 'claude-sonnet-4-20250514',
|
||||
DEFAULT_MODEL_NAME: 'claude-sonnet-4-5',
|
||||
AXIOS_TIMEOUT: 120000, // 2 minutes timeout
|
||||
USER_AGENT: 'KiroIDE',
|
||||
CONTENT_TYPE_JSON: 'application/json',
|
||||
|
|
@ -838,6 +838,7 @@ async initializeAuth(forceRefresh = false) {
|
|||
async generateContent(model, requestBody) {
|
||||
if (!this.isInitialized) await this.initialize();
|
||||
const finalModel = MODEL_MAPPING[model] ? model : this.modelName;
|
||||
console.log(`[Kiro] Calling generateContent with model: ${finalModel}`);
|
||||
const response = await this.callApi('', finalModel, requestBody);
|
||||
|
||||
try {
|
||||
|
|
@ -864,7 +865,8 @@ async initializeAuth(forceRefresh = false) {
|
|||
async * generateContentStream(model, requestBody) {
|
||||
if (!this.isInitialized) await this.initialize();
|
||||
const finalModel = MODEL_MAPPING[model] ? model : this.modelName;
|
||||
|
||||
console.log(`[Kiro] Calling generateContentStream with model: ${finalModel}`);
|
||||
|
||||
try {
|
||||
const response = await this.streamApi('', finalModel, requestBody);
|
||||
const { responseText, toolCalls } = this._processApiResponse(response);
|
||||
|
|
|
|||
Loading…
Reference in a new issue