Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Fix generationConfigSources to preserve existing source info when auto-detecting max_tokens
- Add unit tests for max_tokens fallback logic
When modelProviders config does not specify samplingParams.max_tokens,
requests to non-Qwen models (Claude, GPT, Gemini, etc.) omit max_tokens
entirely. Many APIs default to a small value (e.g., Anthropic via
VertexAI defaults to 4096), causing long responses to be truncated
mid-generation — often breaking tool call parameters.
Fix: apply tokenLimit(model, 'output') as a fallback in
applyResolvedModelDefaults(), following the same pattern already used
for contextWindowSize and modalities auto-detection.
Output limits from tokenLimits.ts:
- Claude Opus 4.6: 128K
- Claude Sonnet 4.6 / fallback: 64K
- GPT-5.x: 128K
- Gemini 3.x: 64K
- Qwen 3.5: 64K
Made-with: Cursor
Move the Docker sandbox Java documentation from docs-site to the
appropriate location in docs/users/features/sandbox.md under the
Troubleshooting section.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Replace verbose prompts with simple 'Say hello' prompts
- Remove fragile text content assertions that depend on specific model responses
- Simplify test logic to focus on message flow rather than content validation
- Add permissionMode: 'default' and test file setup for read-only tool tests
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
When a file is skipped because the model doesn't support a modality,
it should not be treated as an error. The error field was incorrectly
being set alongside the informational message.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Adds the required getContentGeneratorConfig mock to read-file.test.ts
and pathReader.test.ts to fix failing tests that depend on content
generator configuration.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This fixes session corruption issues where the modality check was based on
the model name rather than the actual resolved config, causing inconsistent
behavior when the config's modalities differed from the defaults.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Increase description warning threshold from 500 to 1,000 characters
- Change system prompt 10,000 char limit from error to warning
- Remove intermediate 5,000 char warning threshold for system prompts
- Update documentation to reflect soft warning behavior
This provides more flexibility for users while still guiding them
toward better practices.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Restructures the convertOpenAIResponseToGemini method to set
response.candidates within the choice conditional block, making
the empty choices handling more explicit and the control flow clearer.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add 'array' type support to SettingItemDefinition
- Change hooks field from object to array type
- Add additionalProperties constraint for env fields
- Fix additionalProperties generation to only apply for object types
This ensures the hooks configuration schema correctly represents hooks as an array
and properly validates environment variable objects.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Replay raw PTY output through a terminal buffer to properly collapse
carriage-return progress updates (e.g., git clone progress) instead of
showing all intermediate states.
This ensures the final output reflects what a user would actually see
in their terminal, with progress bars and spinners collapsed to their
final state.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
The Terminal.prototype.write mock's data parameter needed to accept
string | Uint8Array to match the actual method signature.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
StartSessionEvent requires getTruncateToolOutputThreshold,
getTruncateToolOutputLines, getIdeMode, getShouldUseNodePtyShell,
and getHookSystem from the config object.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
When PTY outputs data rapidly, the headless terminal rendering is
slower than appending buffers, and the render queue can be overrun
before finalize() races on exit. Additionally, node-pty can fire
onExit before all onData events have been delivered.
This fix:
- Captures raw output immediately before processing
- Uses setImmediate drain mechanism to flush late onData events
- Builds output from raw chunks instead of xterm buffer to avoid
scrollback limit data loss
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>