Add Ollama-backed Claude launcher with kimi-k2.7-code:cloud model#1
Add Ollama-backed Claude launcher with kimi-k2.7-code:cloud model#1S0fiane wants to merge 1 commit into
Conversation
Adds an executable `claude` Python script that launches an interactive
chat session using a local Ollama model (default: kimi-k2.7-code:cloud).
Includes a Modelfile to configure the model with a data science system prompt.
Usage:
ollama launch claude --model kimi-k2.7-code:cloud
./claude --model kimi-k2.7-code:cloud [--pull] [--list-models]
https://claude.ai/code/session_011UHAX9MTWWpV1v1tGeFqCi
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3d8202f. Configure here.
| print("\nModel ready.") | ||
| except urllib.error.URLError as e: | ||
| print(f"\nFailed to pull model: {e}", file=sys.stderr) | ||
| sys.exit(1) |
There was a problem hiding this comment.
Pull failures still report ready
High Severity
pull_model always prints that the model is ready after the NDJSON stream ends, even when Ollama never sent a status of success or emitted an error object in the stream. main then starts the REPL as if the pull succeeded, so missing or mistyped models (including the default cloud model) can fail only after a misleading success message.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 3d8202f. Configure here.
| break | ||
| except urllib.error.URLError as e: | ||
| print(f"\nError communicating with Ollama: {e}", file=sys.stderr) | ||
| sys.exit(1) |
There was a problem hiding this comment.
Chat errors terminate whole REPL
Medium Severity
On a URLError while streaming a reply, stream_chat calls sys.exit(1) instead of returning an error to the REPL. A transient network or Ollama glitch during one turn ends the entire interactive session instead of reporting the failure and allowing another prompt.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 3d8202f. Configure here.


Adds an executable
claudePython script that launches an interactivechat session using a local Ollama model (default: kimi-k2.7-code:cloud).
Includes a Modelfile to configure the model with a data science system prompt.
Usage:
ollama launch claude --model kimi-k2.7-code:cloud
./claude --model kimi-k2.7-code:cloud [--pull] [--list-models]
https://claude.ai/code/session_011UHAX9MTWWpV1v1tGeFqCi
Note
Low Risk
New standalone tooling with no changes to app auth, data paths, or production services; only local HTTP to Ollama.
Overview
Adds a local dev assistant that talks to Ollama instead of a hosted API: an executable
claudescript plus an optionalModelfileto bake in the same data-science/Pandas system prompt and model params.The
claudeentrypoint checks that Ollama is up, can list or pull models, then runs an interactive REPL that streams chat via/api/chat(default modelkimi-k2.7-code:cloud). TheModelfilelayers that system prompt,temperature 0.2, andnum_ctx 16384on top of the base model when you create a custom Ollama image.Reviewed by Cursor Bugbot for commit 3d8202f. Bugbot is set up for automated code reviews on this repo. Configure here.