Skip to content

Fix CLI logs and Ollama integration - #5

Open
badalraj9 wants to merge 4 commits into
ollama-support-and-fixes-9081749028868676832from
fix-cli-ollama-and-logs-14357900044197941148
Open

Fix CLI logs and Ollama integration#5
badalraj9 wants to merge 4 commits into
ollama-support-and-fixes-9081749028868676832from
fix-cli-ollama-and-logs-14357900044197941148

Conversation

@badalraj9

Copy link
Copy Markdown
Owner

This change addresses the user's frustration with chaotic CLI output and Ollama issues.

  1. Log Cleanup: By defaulting noisy libraries to WARNING level, the CLI experience is much cleaner.
  2. Ollama Fix: Switching to the /api/chat endpoint ensures modern chat models work correctly, as they often expect a chat structure rather than raw completion.
  3. CLI Enhancement: The mt provider use command now supports setting the model inline, streamlining the workflow.

PR created automatically by Jules for task 14357900044197941148 started by @badalraj9

- Suppress noisy logs (httpx, httpcore, urllib3) by default in `memory_thread/utils/logger.py` to keep the CLI clean.
- Update `memory_thread/sdk.py` to use the `/api/chat` endpoint for Ollama, improving compatibility with chat models, and add a fallback to `/api/generate`.
- Enhance `mt provider use` command in `memory_thread/cli.py` to accept a `--model` / `-m` argument, allowing simultaneous provider and model switching.

Co-authored-by: badalraj9 <128183727+badalraj9@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules Bot and others added 3 commits February 11, 2026 04:16
- Update `setup.py` to force UTF-8 encoding when reading `README.md`, fixing installation issues on Windows.
- Suppress noisy logs (httpx, httpcore, urllib3) by default in `memory_thread/utils/logger.py`.
- Update `memory_thread/sdk.py` to use `/api/chat` for Ollama with a fallback to `/api/generate`.
- Enhance `mt provider use` command in `memory_thread/cli.py` to accept a `--model` argument.

Co-authored-by: badalraj9 <128183727+badalraj9@users.noreply.github.com>
- Bump version to 3.0.0 in `setup.py` and `cli.py`.
- Suppress noisy logs from transformers, torch, and psycopg2 to clean up CLI output.
- Gracefully handle Postgres connection failures by downgrading log level to DEBUG.
- Fix LLM response parsing in `sdk.py` to support multiple assistant markers, resolving cutoff issues.

Co-authored-by: badalraj9 <128183727+badalraj9@users.noreply.github.com>
…er logic

- Bump version to 3.0.0 in `setup.py` and `memory_thread/cli.py` (for real this time).
- Enhance `vault.get_active_provider` in `memory_thread/nervous/vault.py` to correctly handle user vs global preferences, ensuring Ollama can be selected.
- Add robust debug logging in `memory_thread/sdk.py` to trace provider selection and support `MT_PROVIDER` environment variable override.
- Clean up `memory_thread.egg-info` to force a clean build.

Co-authored-by: badalraj9 <128183727+badalraj9@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant