GeezerVison is showing github.com — feat: Add local LLM improvements for reasoning models and Docker startup by csfet9 · Pull Request #88 · vectorize-io/hindsight
Conversation
csfet9
commented
Jan 2, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
- Reasoning model support: Strip thinking tags from local LLM responses, enabling Qwen3, DeepSeek, and other reasoning models
- Docker retry-start script: Wait for dependencies (LLM Studio, database) before starting Hindsight
Changes
Reasoning Model Support (llm_wrapper.py)
Strips thinking tags from local LLM responses:
<think>...</think>
<thinking>...</thinking>
<reasoning>...</reasoning>
|startthink|...|endthink|
This enables reasoning models like Qwen3 to work with Hindsight's JSON extraction pipeline. Non-breaking change - only affects responses that contain these tags.
Docker Retry Start Script (retry-start.sh)
New startup script that waits for dependencies:
- Checks LLM Studio at
/v1/models endpoint
- Checks database connectivity (skipped for embedded pg0)
- Configurable retries via
HINDSIGHT_RETRY_MAX (default: infinite)
- Configurable interval via
HINDSIGHT_RETRY_INTERVAL (default: 10s)
Prevents startup failures when LLM Studio takes time to load models.
Test plan
- Tested reasoning model support with Qwen3 8B on LM Studio
- Verified thinking tags are stripped correctly
- Tested retry-start with LLM Studio dependency
- Verified embedded pg0 detection works
- Health endpoint returns healthy after startup
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
## Reasoning Model Support
- Strip thinking tags from local LLM responses (<think>, <thinking>, <reasoning>, |startthink|/|endthink|)
- Enables Qwen3, DeepSeek, and other reasoning models to work with JSON extraction
- Non-breaking: only affects responses that contain thinking tags
## Docker Retry Start Script
- New retry-start.sh waits for dependencies before starting Hindsight
- Checks LLM Studio availability at /v1/models endpoint
- Checks database connectivity (skipped for embedded pg0)
- Configurable via HINDSIGHT_RETRY_MAX and HINDSIGHT_RETRY_INTERVAL env vars
- Prevents startup failures when LLM Studio isn't ready yet
Tested on Apple Silicon M4 Max with Qwen3 8B via LM Studio.
|
|
@@ -0,0 +1,78 @@ |
|
|
#!/bin/bash
|
|
|
# Retry wrapper - waits for dependencies before starting hindsight
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you modify the existing file start-all (instead of creating a new one) and indicate what is the problem you are trying to solve?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
# Strip reasoning model thinking tags (various formats)
|
|
|
# Supports: <think>, <thinking>, <reasoning>, |startthink|/|endthink|
|
|
|
if content:
|
|
|
original_len = len(content)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use the flag in the llm call to not include thinking tokens in the output? this way the user will not pay for those output tokens and we don't have to leverage on this heuristic and problematic algorithm
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
- Remove stale pg0 instance data after pre-caching binaries to avoid
port conflicts (was using hardcoded port 5555 from build time)
- Remove unused cache copy logic from start-all.sh
- Add database backup instructions to CLAUDE.md
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.