mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-09-01 17:10:24 +08:00
Compare commits
1 Commits
renovate/m
...
fix/defaul
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a4c0cfcc3 |
@@ -493,9 +493,9 @@ IMPORTANT: The "Current diagram XML" is the SINGLE SOURCE OF TRUTH for what's on
|
|||||||
const result = streamText({
|
const result = streamText({
|
||||||
model,
|
model,
|
||||||
abortSignal: req.signal,
|
abortSignal: req.signal,
|
||||||
...(process.env.MAX_OUTPUT_TOKENS && {
|
// Must be sent: unset means the provider's own default, and Bedrock's is 4096 —
|
||||||
maxOutputTokens: parseInt(process.env.MAX_OUTPUT_TOKENS, 10),
|
// enough for a small diagram, so larger ones were cut off mid-attribute.
|
||||||
}),
|
maxOutputTokens: Number(process.env.MAX_OUTPUT_TOKENS) || 16000,
|
||||||
stopWhen: stepCountIs(5),
|
stopWhen: stepCountIs(5),
|
||||||
// Repair truncated tool calls when maxOutputTokens is reached mid-JSON
|
// Repair truncated tool calls when maxOutputTokens is reached mid-JSON
|
||||||
experimental_repairToolCall: async ({ toolCall, error }) => {
|
experimental_repairToolCall: async ({ toolCall, error }) => {
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ AI_PROVIDER=bedrock
|
|||||||
# Example: AI_MODEL=doubao-seed-1-8-251215,doubao-seed-1-6-flash,doubao-seed-1-6-pro
|
# Example: AI_MODEL=doubao-seed-1-8-251215,doubao-seed-1-6-flash,doubao-seed-1-6-pro
|
||||||
AI_MODEL=global.anthropic.claude-sonnet-4-5-20250929-v1:0
|
AI_MODEL=global.anthropic.claude-sonnet-4-5-20250929-v1:0
|
||||||
|
|
||||||
|
# Output limit, all providers (default: 16000). Raise it if large diagrams arrive cut off.
|
||||||
|
# MAX_OUTPUT_TOKENS=16000
|
||||||
|
|
||||||
# AWS Bedrock Configuration
|
# AWS Bedrock Configuration
|
||||||
# AWS_REGION=us-east-1
|
# AWS_REGION=us-east-1
|
||||||
# AWS_ACCESS_KEY_ID=your-access-key-id
|
# AWS_ACCESS_KEY_ID=your-access-key-id
|
||||||
|
|||||||
Reference in New Issue
Block a user