-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Checked other resources
- This is a bug, not a usage question. For questions, please use the LangChain Forum (https://forum.langchain.com/).
- I added a very descriptive title to this issue.
- I searched the LangChain.js documentation with the integrated search.
- I used the GitHub search to find a similar question and didn't find it.
- I am sure that this is a bug in LangChain.js rather than my code.
- The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).
Example Code
import { ChatBedrockConverse } from "@langchain/aws";
const bedrock = new ChatBedrockConverse({
model: "openai.gpt-oss-120b-1:0",
region: "us-east-1",
performanceConfig: {
latency: 'optimized',
},
credentials: {
accessKeyId: ACCESS_KEY_ID,
secretAccessKey: SECRET_ACCESS_KEY,
},
});
const aiMsg = await bedrock.invoke([
[ "system", "You are a helpful assistant."],
["human", "How are you?"],
])
console.log(JSON.stringify(aiMsg.contentBlocks, null, 2));Error Message and Stack Trace (if applicable)
No response
Description
ReasoningContentBlock is not being correctly inferred from AWS Bedrock gpt-oss model responses.
Actual response:
[
{
"type": "non_standard",
"value": {
"type": "reasoning_content",
"reasoningText": {
"text": "The user asks \"How are you?\" It's a casual question. I respond politely."
}
}
},
{
"type": "text",
"text": "I'm doing great, thank you! How can I assist you today?"
}
]Expected response:
[
{
"type": "reasoning",
"reasoning": "The user asks \"How are you?\" It's a casual question. I respond politely."
},
{
"type": "text",
"text": "I'm doing great, thank you! How can I assist you today?"
}
]System Info
[email protected]
mac
Node v23.11.1
pnpm 10.19.0
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working