test: update module_llm tests for system prompt handling (None -> "")#44
Merged
colinfrisch merged 1 commit intomesa:mainfrom Jan 5, 2026
Merged
Conversation
Contributor
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
Author
|
It seems like The Upload coverage to Codecov step in the mesa/mesa-llm workflow failed due to a missing or invalid CODECOV_TOKEN, preventing the coverage report upload. |
colinfrisch
reviewed
Dec 25, 2025
Member
|
LGTM, thanks !! |
colinfrisch
added a commit
that referenced
this pull request
Jan 27, 2026
* created agent and model class * create agent and model with ollama * correct terminal * some additional changes * mesa_llm tutorial is now done * Improve reasoning demonstration in introductory model tutorial * finalize first mesa-llm model tutorial focused on LLMAgent * Add tutorial-friendly negotiation model * Minor cleanup * Delete accidently created file * Update docs/negotiation_model_tutorial.md * Add agent messaging and documentation fixes to negotiation tutor * fix first_model & negotiation_model_tutorial * fix first model * inital commit model.py and agent.py * runs with errors * runs with errors * fixed harvesting logic * final tests with gemini-2.5-flash-lite * Readme.md file added * readme.md * Fix harvesting logic in tools.py * review changes * review 2 * fix: treat ollama_chat as ollama provider (#43) * link to readthedocs and small fixes * Fix and add dependencies (#49) * fix-prompt-gestion * fix-prompt-gestion align testing * fix dependencies * Fix prompt gestion (#48) * fix-prompt-gestion * fix-prompt-gestion align testing * Bump actions/upload-artifact from 5 to 6 (#50) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v5...v6) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions/cache from 4 to 5 (#51) Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](actions/cache@v4...v5) --- updated-dependencies: - dependency-name: actions/cache dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * test: update module_llm tests for system prompt handling (None -> "") (#44) * test disabling Codecov upload * test build * testing id-token: write * reset * feat: Add dialogue history context to negotiation agents - Implement _get_dialogue_history() to extract conversation from memory - Inject dialogue context into reasoning prompts - Support both STLTMemory and EpisodicMemory - Handle both agent objects (send_message) and IDs (speak_to tool) - Format senders as 'AgentType ID' for clarity - Limit to last 5 exchanges to manage context window Fixes agent amnesia in multi-turn negotiations where agents forgot previous offers and repeated themselves. * refactor: address code review feedback - remove duplication, optimize iteration, remove debug prints * docs: minor fixes to first model and negotiation_model * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Colin FRISCH <colin.frisch@gmail.com> Co-authored-by: sujal gawas <sujalgawas18@gmail.com> Co-authored-by: februarysea <31513558+februarysea@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nithin9585 <nithin958595@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.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.
Summary
Updates existing tests to align with the system prompt handling behavior introduced in the previous fix. This ensures the test suite correctly reflects the normalized handling of empty system prompts.
Bug / Issue
This PR is a follow-up to #41 (Fix Ollama tool calling crash when system prompt is None).
In PR #41, the runtime crash was resolved by normalizing the system prompt when it is
None. However, some existing tests still assumed the old behavior, causing a mismatch between the implementation and the test expectations.Implementation
test_module_llm.pyto align with the current behavior where an empty or missing system prompt is normalized to an empty string (None -> "") for Ollama models.Testing
pytestandpre-commit.Additional Notes
N/A