chore: promote dev to main - #108
Merged
Merged
Conversation
Adds a "+" icon button next to the folder selector in GitContext so users can add a folder to the current workspace without leaving the selector context.
… model roles The model had no awareness of the workspace's folders or which one was active, only tools did. Adds a "## Workspace" section to the system prompt listing every folder and marking the active one. Also fixes model role selectors (chat/summarize/vision) showing UNAVAILABLE forever when the persisted model name belonged to a provider that's no longer active — get_model_roles now falls back to the first catalog model that fits the role and persists the swap.
DeepSeek and other reasoning models via OpenAI-compatible endpoints were producing empty turns (reasoning ate the whole max_tokens budget) and the loop bailed on the first stream error with no retry. - Raise max_tokens cap 8192 -> 16384 so reasoning content doesn't starve the answer. - Retry an empty model turn up to 3x instead of once. - Retry transient stream-open/mid-stream network errors (rate limits, connection resets) up to 2x with backoff before failing the whole turn, as long as nothing has streamed yet. - Raise MAX_TOOL_ROUNDS 50 -> 100 for long legitimate multi-step turns. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Fixes CI formatting check broken since a324ccd.
…cation The empty-turn retry added earlier wasn't enough: when a reasoning model truncates deterministically (finish_reason == "length", spends its whole budget on <think> with zero answer), repeating the identical request just repeats the same runaway reasoning and truncates again every time. - Provider::start_stream now takes an optional max_tokens override; both OpenAI-compatible and Ollama backends honor it (Ollama also widens num_ctx to fit). - OpenAI-compatible streams now surface finish_reason via a new StreamEvent::FinishReason. - The agent loop detects finish_reason == "length" and, on retry, doubles the completion budget (16384 -> 32768 -> 65536) with its own 3-attempt budget and a nudge telling the model to stop deliberating and answer, instead of sharing the generic empty-reply retry path. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The generic "I wasn't able to generate a response. Please try again or rephrase your request." gave no signal about what actually happened, so users had no way to tell a flaky connection from a model stuck truncating on reasoning. ensure_reply now takes an explicit fallback message; the agent loop tracks whether the empty-reply retries were exhausted specifically due to truncation (finish_reason == "length") and picks a fallback that says so plus what to try next, instead of a one-size-fits-all apology. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Root-caused via the boost workspace's sessions.db: the failing turn's
raw response was 50+ chunks of pure reasoning_content with finish_reason
null throughout — the gateway connection closed mid-thought without ever
sending [DONE] or a finish_reason, and the SSE reader treated that
silently as a normal end-of-stream, indistinguishable from the model
choosing to say nothing.
openai_compat.rs now tracks whether the stream actually terminated
properly; if it didn't and nothing was produced, it flags
FinishReason("dropped") instead of just going quiet. The agent loop
treats that the same as the other stream-error cases (retry with
backoff) instead of running it through the model-facing empty-reply
nudge, since there's nothing to nudge — the model never got to finish.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promotes
devtomain. Eight commits: the empty-reply fix for reasoning models is complete, plus a/loopsession driver.The "I wasn't able to generate a response" dead end, finished
Hit mostly on
deepseek/deepseek-v4-flashvia the LiteLLM gateway, always right after a large tool result. Traced from.micelio/sessions.db: a reasoning model spent its whole context window on the thinking pass and ended the turn with empty content. The previous PR capped output tokens; this one makes the loop survive the remaining cases.finish_reason: length; the first retry doubles the budget so a truncated reply actually gets finished.Better context
UI
/loopsession driver