{"record":{"id":"e57a29397e463bc7","repo":"continuedev/continue","slug":"unsupported-tool-call-type-in-bedrock-tool-type","errorCode":null,"errorMessage":"Unsupported tool call type in Bedrock: ${tool.type}","messagePattern":"Unsupported tool call type in Bedrock: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/openai-adapters/src/apis/Bedrock.ts","lineNumber":293,"sourceCode":"                currentBlocks.push({\n                  toolUse: {\n                    toolUseId: toolCall.id,\n                    name: toolCall.function.name,\n                    input: safeParseArgs(\n                      toolCall.function.arguments,\n                      `Call: ${toolCall.function.name} ${toolCall.id}`,\n                    ),\n                  },\n                });\n                hasAddedToolCallIds.add(toolCall.id);\n              } else {\n                const toolCallText = `Assistant tool call:\\nTool name: ${toolCall.function.name}\\nTool Call ID: ${toolCall.id}\\nArguments: ${toolCall.function?.arguments ?? \"{}\"}`;\n                currentBlocks.push({\n                  text: toolCallText,\n                });\n              }\n            } else {\n              console.warn(\n                `Unsupported tool call type in Bedrock: ${toolCall.type}`,\n              );\n            }\n          }\n        }\n      }\n    }\n\n    if (currentBlocks.length > 0) {\n      pushCurrentMessage();\n    }\n\n    // If caching is enabled, add cache points\n    // if (this.config.cacheBehavior?.cacheConversation) {\n    //   this._addCachingToLastTwoUserMessages(converted);\n    // }\n\n    return converted;","sourceCodeStart":275,"sourceCodeEnd":311,"githubUrl":"https://github.com/continuedev/continue/blob/5522c6f44ca0ac3528b37244818fbfa39b5af470/packages/openai-adapters/src/apis/Bedrock.ts#L275-L311","documentation":"During message conversion for Bedrock, tool calls on assistant messages are serialized into text blocks when their type is recognized (e.g. \"function\"). A tool entry with any other type falls into the else branch, logs this warning, and is dropped from the converted message — the tool call context is lost for that request.","triggerScenarios":"Passing an assistant message with tool calls whose type is not \"function\" — e.g. custom tool types, future OpenAI variants, or malformed objects where type is undefined/misspelled.","commonSituations":"Hand-building message histories, replaying recorded OpenAI traffic with newer tool types, or bugs that produce tool objects without a type field.","solutions":["Normalize tool call entries to type: \"function\" with function: { name, arguments, } and a string id before sending","Validate recorded/replayed histories: drop or map unknown tool types upstream","If you control the upstream model output, ensure it emits standard OpenAI function tool calls"],"exampleFix":"// before\ntoolCalls: [{ id: \"1\", type: \"custom_tool\", custom: {...} }]\n\n// after\ntoolCalls: [{ id: \"1\", type: \"function\", function: { name: \"myTool\", arguments: \"{}\" } }]","handlingStrategy":"type-guard","validationCode":"if (toolCalls.some((t) => t.type !== \"function\")) {\n  throw new Error(\"All tool calls must be type 'function' for Bedrock\");\n}","typeGuard":"const isFunctionToolCall = (t: unknown): t is { id: string; type: \"function\"; function: { name: string; arguments: string } } =>\n  !!t && (t as any).type === \"function\" && typeof (t as any).function?.name === \"string\";","tryCatchPattern":null,"preventionTips":["Normalize recorded/hand-built histories: every tool call must be type \"function\"","Validate message shape before sending cross-provider","Map unknown tool types to function form or drop them explicitly upstream"],"tags":["bedrock","tool-calls","openai-compat","message-conversion"],"backgroundTag":"unsupported-tool-call-type","analyzedSha":"5522c6f44ca0ac3528b37244818fbfa39b5af470","analyzedAt":"2026-08-27T11:28:54.683Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}