- Update cache duration test from 5 minutes to 24 hours
- Add circuit breaker tests for handling consecutive API failures
- Add rate limit (429) backoff tests with Retry-After header support
- Update test descriptions to reflect current implementation status
- Tests remain skipped pending feature flag enablement
* Fix: LiteLLM thinking configuration not showing for models (#8342)
* fix: add supportsReasoning to LiteLLM proto serialization
The model ID key fix alone wasn't sufficient - supportsReasoning was
being lost during the proto serialization cycle when saving/loading
model info. This adds the field to all relevant conversion functions.
---------
Co-authored-by: ClineXDiego <diego@cline.bot>
Co-authored-by: Robin Newhouse <robin@cline.bot>
* feat: add stealth/giga-potato test model to OpenRouter
Add a new stealth model "stealth/giga-potato" for testing purposes:
- Define model info in CLINE_STEALTH_MODELS with 128k context window
- Add to freeModels list in OpenRouterModelPicker for UI display
- Model supports images and prompt caching with zero pricing
* Fixing wording
Add two new CLI auth providers for headless setups and map their
configuration fields. Fix auth menu/provider status to use the
workspace-backed auth instance so the configured provider displays
correctly.
* feat(hooks): Run hooks from cwd of the workspace repo root.
* feat(hooks): npm run changeset
* feat(hooks): Make hooks execute in their respective repo's root dir.
* feat(hooks): Improvements as per Cline's code review feedback.
* chore: extract storage migrations to extension layer
Extracts VS Code specific storage migrations from common initialization into a dedicated function. This isolates the logic to the extension layer, making it clear that these steps are not applicable to other clients.
* invoke performStorageMigrations in vs code activation event
* fix check
* changeset version bump
* Updating CHANGELOG.md format
* release(3.55.0): Version bump and update WhatsNewModal
* feat(settings): Support linking to recommended or free model picker.
* Send to cline provider
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: cline-test <132302818+candieduniverse@users.noreply.github.com>
Co-authored-by: Arafatkatze <arafat.da.khan@gmail.com>
Add arcee-ai/trinity-large-preview:free as a new free model option:
- Add to onboarding models with 131k context window and score of 88
- Include in OpenRouterModelPicker free models list
- Update filter to preserve Trinity Large models like Minimax models
* docs(rules): Initial thoughts on docs for conditional rules.
* docs: restructure Cline Rules documentation into nested structure
Reorganize Cline Rules documentation by:
- Creating a "Cline Rules" group with overview and conditional-rules pages
- Moving conditional-rules.mdx into features/cline-rules/ subdirectory
- Adding URL redirects for backward compatibility
- Streamlining conditional-rules content for clarity and conciseness
- Adding cross-reference link to the overview page
This improves documentation navigation by grouping related rule concepts together and makes the content more accessible with clearer, more concise explanations.
* docs(cline-rules): consolidate rule file format documentation
Reorganize and expand the documentation for supported rule file formats:
- Add new "Supported Rule Files" section with comprehensive table
- Document cross-tool compatibility (Cursor, Windsurf, AGENTS.md)
- Clarify file priority and loading behavior
- Remove separate AGENTS.md section and integrate into unified table
This improves discoverability by showing all supported formats in one
place and makes it clearer how Cline works with rules from different AI
coding tools.
* docs(rules): remove context management note from overview
---------
Co-authored-by: cline-test <132302818+candieduniverse@users.noreply.github.com>
* feat(deepseek): add native tool calling support and reasoning_content passback
- Add DeepSeek to isNextGenModelProvider list to enable native tool calling
- Add isDeepSeekModelFamily function for model identification
- Add addReasoningContent function for DeepSeek Reasoner's reasoning_content field
- Pass back reasoning_content during tool calling within the same turn
- Clear reasoning_content when starting a new conversation turn
- Compliant with DeepSeek API documentation for thinking mode with tool calling
* Update src/core/api/transform/r1-format.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update comments for user message handling logic
Clarify reasoning for handling user messages in comments.
* Update src/core/api/transform/r1-format.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix: format code for consistency in isNextGenModelFamily function
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ara <arafat.da.khan@gmail.com>
* feat: add MCP prompts support
Implement support for MCP prompts as defined in the MCP spec (2025-06-18):
- Add McpPrompt and McpPromptArgument types to shared types
- Update proto definitions with prompt messages
- Update McpHub to fetch prompts list and get individual prompts
- Add prompts to system prompt component for AI awareness
- Add McpPromptRow UI component for displaying prompts
- Update ServerRow with Prompts tab showing available prompts
- Add slash command integration (/mcp:<server>:<prompt>)
- Update regex patterns to support colons in command names
MCP prompts are user-controlled templates that can be invoked via
slash commands to inject contextual messages into the conversation.
* style: alphabetize imports in mcp-server-conversion.ts
Reorder imports to follow project convention of alphabetical ordering.
* feat: add MCP prompts to slash command autocomplete
Wire up mcpServers to SlashCommandMenu so MCP prompt commands appear
in the autocomplete dropdown with their own "MCP Prompts" section.
* test: add unit tests for MCP prompt slash commands
- Add webview slash-commands.test.ts testing getMcpPromptCommands,
getMatchingSlashCommands, and validateSlashCommand with MCP servers
- Add backend slash-commands tests for formatMcpPromptResponse and
parseSlashCommands MCP handling
- Export formatMcpPromptResponse for testability
- Add "mcp_prompt" to telemetry captureSlashCommandUsed types
* test: update snapshots and fix backend tests for MCP prompts
- Update system prompt snapshots to include MCP prompts section
- Remove backend tests requiring StateManager initialization
(tests for unknown server, no fetcher, fetcher errors)
- Core MCP prompt functionality is covered by remaining tests
* fix: change test status to valid 'connecting' value
* chore: remove commented debug line from prompts fetching
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: use Logger instead of console.error for lint compliance
* fix: wire up mcpPromptFetcher callback to parseSlashCommands
The MCP prompt slash commands were not working because the
mcpPromptFetcher callback was never passed to parseSlashCommands.
This adds the callback that wraps mcpHub.getPrompt() to actually
fetch and inject prompt content when using /mcp:server:prompt.
* fix: resolve MCP prompts keyboard navigation and edge cases
- Add mcpServers param to keyboard handler's getMatchingSlashCommands calls
to fix arrow key navigation and Enter/Tab selection for MCP prompts
- Add null check for connection.client in McpHub.getPrompt()
- Add debug logging when MCP prompt fetch returns null
- Fix regex in shouldShowSlashCommandsMenu to include colons for MCP format
* chore: add changeset for MCP prompts feature
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Robin Newhouse <robin@cline.bot>
* refactor: simplify ThinkingRow expansion state management
Remove the responseStarted prop and complex logic that conditionally controlled ThinkingRow visibility during streaming. Simplify to allow ThinkingRow to remain expandable throughout the entire streaming lifecycle instead of forcing it expanded during reasoning and then collapsing after response starts.
Changes:
- Remove ApiReqState type and responseStarted tracking
- Eliminate showStreamingThinking and showCollapsedThinking logic
- Use consistent isExpanded state based only on user toggle
- Always show ThinkingRow title
* remove unused responseStarted
* feat(ui): update thinking UI with improved expand/collapse controls
Changes:
- Replace "Thinking..." with "Working..." status text in non-plan mode
- Switch from ChevronRight to ChevronUp/Down icons for better UX
- Redesign thinking section header with cleaner layout
- Remove preview text when collapsed, show only "Thinking" label
- Add consistent border styling to thinking content
- Implement per-tool thinking expand/collapse state management
- Update icon sizing and styling for better visual consistency
This improves the user experience by making the thinking/reasoning sections more intuitive to expand and collapse, with clearer visual indicators and a more polished appearance.
* add blur
* feat: chevron fix, reasoning change, slight style change
* feat: spacing issues
* keep thinking row expanded during stream
* Reasoning -> Thoughts
* feat: Inline reading of files vs having reading then read list items seperately
* feat: remove extra reading state
* feat: removed reasoning from file expandable file state
---------
Co-authored-by: Jose R. Perez <trupix@gmail.com>
- Native tool calls support for Ollama provider
- Sonnet 4.5 is now the default Amazon Bedrock model id
- Prevent infinite retry loops when replace_in_file fails repeatedly. The system now detects repeated failures and provides better guidance to break out of retry cycles.
- Skip diff error UI handling during streaming to prevent flickering. Error handling is deferred until streaming completes.
- Strip notebook cell outputs when extracting text content from Jupyter notebooks, significantly reducing context size sent to the LLM.
- Throttle diff view updates during streaming to reduce UI flickering and improve performance.
- Removed Devstral-2512 free from the free models list
- Removed deprecated zai-glm-4.6 model from Cerebras provider
Co-authored-by: Arafatkatze <arafat.da.khan@gmail.com>
Remove mistralai/devstral-2512:free from:
- Onboarding models configuration
- Free models picker in settings
- OpenRouter model filter exception list
The Devstral model is no longer included as a free tier option.
* feat: add support for tool calls in Ollama API
Enhanced OllamaHandler to support tool calls by adding a 'tools' parameter to createMessage. Implements processing of tool call deltas using ToolCallProcessor, enabling handling of function calls made by the model. Added necessary imports for ChatCompletionTool and ToolCallProcessor types.
* add changeset
- Skip PostHog client initialization when running in self-hosted mode
- Return no-op config from ErrorProviderFactory and FeatureFlagsProviderFactory
- Add comprehensive tests for self-hosted mode PostHog disabling behavior
This ensures no telemetry or analytics data is sent when users run
the extension in a self-hosted environment.
* feat: add appendOutputLog RPC for host bridge logging
Add new appendOutputLog RPC endpoint to EnvService proto definition
and refactor VSCode output channel creation to use a dedicated factory
function. This enables structured logging through the host bridge
service instead of direct Logger calls.
* rename appendOutputLog to debugLog and add subscriber pattern
- Rename `appendOutputLog` RPC to `debugLog` with documentation
- Refactor Logger to use subscriber pattern instead of single output
- Update HostProvider to use env.debugLog directly for logging
- Remove redundant logger callback from setupHostProvider
* feat: add multi-subscriber support for Logger output
- Rename Logger.setOutput to Logger.subscribe to better reflect behavior
- Subscribe both output channel and debug logger to receive log messages
- Enable logging to multiple destinations simultaneously
* update mock
* fix: skip diff error UI handling during streaming to prevent flickering
During streaming, handlePartialBlock is called repeatedly, and if the diff
application fails (e.g., search string not found), all the error handling code
was running on every chunk. This caused:
- consecutiveMistakeCount to rapidly increment
- diff_error messages to be added/removed repeatedly
- revertChanges/reset to be called repeatedly
- rapid flickering of the diff viewer
Now we return early from the catch block when block.partial is true, skipping
all error UI handling. The error is only processed once on the final block.
* chore: add changeset for diff error suppression
* test: add unit tests for partial block streaming behavior
Adds tests verifying that error handling is skipped during streaming
(block.partial=true) to prevent counter rapid increment and UI flickering.
* chore: remove unused errorPushedForCallIds tracking
This mechanism was replaced by the simpler block.partial check for
skipping error handling during streaming. Remove the dead code.
* fix: prevent infinite retry loops when replace_in_file fails repeatedly
The consecutiveMistakeCount was being reset to 0 at the START of each
WriteToFileToolHandler execution, before the tooManyMistakes check could
see accumulated failures. This allowed the model to retry failing
replace_in_file operations indefinitely, causing context explosion.
Changes:
- Move counter reset from before operation to after successful saveChanges()
- Add consecutiveMistakeCount++ in the diff error catch block
- Fix typo: "his thought process" → "Cline's thought process"
* chore: add changeset for retry loop prevention
* test: add unit tests for consecutiveMistakeCount behavior
Verify the fix for infinite retry loops by testing that:
- Counter is NOT reset at the start of operations
- Counter IS reset only after successful saveChanges()
- Counter IS incremented on diff errors
- Repeated failures accumulate so tooManyMistakes can trigger
* fix: throttle diff view updates during streaming
Skip redundant rapid updates to reduce performance issues in large
streams (e.g., notebooks) and reset throttle state on cleanup.
* chore: add changeset for diff throttling fix
* test: add unit tests for diff view update throttling
Add comprehensive tests for the throttling behavior introduced in the
streaming diff updates fix. Tests cover empty content, unchanged content,
time-based throttling, final update bypass, and state reset.
* chore: migrate host logging to shared Logger service
- Replace HostProvider.logToChannel usage with Logger.log/error
in controller, webview, and checkpoint migration code
- Remove redundant, low-value log statements from Cline API
methods to reduce noise
- Centralize logging through shared Logger service for more
consistent, structured logging and easier maintenance
- Remove redundant , low-value log statements from StateManager where
we logged error that would be throw and get logged again
* Update src/integrations/checkpoints/CheckpointMigration.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix
* update tests
* update tests
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Users reported seeing this error with the OpenAI Codex provider:
{"message":"Cannot read properties of undefined (reading 'type')","modelId":"gpt-5.2-codex"}
The issue occurs when filtering tools before sending to the Responses API.
The filter accessed .type without checking if the tool element was defined:
tools.filter((tool) => tool.type === "function")
If the tools array contains any undefined elements, this throws. Fixed by
adding optional chaining:
tools.filter((tool) => tool?.type === "function")
Applied the same fix to all three providers using the Responses API:
- openai-codex.ts (ChatGPT Plus/Pro subscriptions)
- openai-native.ts (OpenAI API with Responses format)
- oca.ts (OpenAI-compatible API with Responses format)
* changeset version bump
* Updating CHANGELOG.md format
* update changelog and banner for release
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Max Paulus 🥪 <max@cline.bot>
- Extract model retrieval to avoid multiple function calls
- Use temperature from model.info with fallback to 0 instead of hardcoded value
- Allows temperature to be configured per model rather than using a fixed value
This change enables more flexible temperature configuration for different Cerebras models while maintaining backward compatibility with a default value of 0.
Set default temperature value of 0.9 for Cerebras model in the model
configuration. This establishes a consistent default sampling temperature
for the model's response generation behavior.