Skip to content

Add Google Gemma local LLM support, harden config parsing, improve local LLM handling, and update CI/docs#2

Merged
AlexTkDev merged 2 commits intomainfrom
codex/update-model-to-use-google-gemma4
Apr 19, 2026
Merged

Add Google Gemma local LLM support, harden config parsing, improve local LLM handling, and update CI/docs#2
AlexTkDev merged 2 commits intomainfrom
codex/update-model-to-use-google-gemma4

Conversation

@AlexTkDev
Copy link
Copy Markdown
Owner

Motivation

  • Swap the default local model from TinyLlama to Google Gemma 4 to improve offline instruction quality and align docs and defaults.
  • Make environment integer parsing robust to invalid or out-of-range values to avoid startup crashes.
  • Improve local LLM invocation ergonomics and error messages to provide safer, clearer fallback behavior.

Description

  • Add a safe integer parser _get_int_env in config.py and expose LOCAL_LLM_MODEL_PATH, LOCAL_LLM_CONTEXT, LOCAL_LLM_THREADS, and LOCAL_LLM_MAX_TOKENS with sensible defaults.
  • Update services/local_llm.py to load the model from LOCAL_LLM_MODEL_PATH, use configured n_ctx/n_threads, normalize max_tokens, harden prompt handling, and provide clearer logging and error strings.
  • Adjust services/llm.py import to from services.local_llm import ask_local_llm and preserve optional process-based execution for local LLM calls.
  • Update documentation files (README.md, models/README.md) to reflect Google Gemma 4 usage, update model download examples and .env guidance, and change release/version notes to v4.1.0.
  • Update CI lint workflow .github/workflows/pylint.yml to use actions/setup-python@v5 and reduce the test matrix to python-version: ["3.10", "3.14"].

Testing

  • Added unit tests tests/test_config.py and tests/test_local_llm.py and ran pytest, with the new tests passing.
  • Updated CI lint workflow at .github/workflows/pylint.yml to run on push with actions/setup-python@v5 and the updated Python matrix so linting will execute automatically on push.

Codex Task

@AlexTkDev AlexTkDev merged commit 01f1f2e into main Apr 19, 2026
0 of 2 checks passed
@AlexTkDev AlexTkDev deleted the codex/update-model-to-use-google-gemma4 branch April 19, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant