-
Notifications
You must be signed in to change notification settings - Fork 35
Ollama model support #189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Ollama model support #189
Conversation
- Updated `.roborev.toml` to include detailed agent settings for OpenCode, specifying the model and maximum review depth. - Expanded review guidelines in `AGENTS.md` to emphasize critical areas such as concurrency safety, error handling, and Go-specific patterns. - Clarified instructions for addressing review feedback, including the necessity of using tools for modifications and the importance of updating tests after changes. These changes aim to improve the clarity and effectiveness of the review process within the RoboRev project.
- Introduced the OllamaAgent, which integrates with the Ollama HTTP API for code reviews. - Updated agent registry to include new agents: droid and ollama. - Enhanced availability checks for agents, allowing for HTTP health checks. - Modified tests to validate the functionality of the new Ollama agent and its integration. - Updated configuration to support Ollama-specific settings, including base URL and model. These changes expand the capabilities of the agent system and improve the overall review process within the project.
- Added tests for handling 401 Unauthorized and unexpected JSON responses in the Ollama agent's Review method. - Introduced tests for availability checks in the Ollama agent, ensuring correct behavior for 401 and 404 HTTP status codes. - Updated documentation for the AvailabilityChecker interface to clarify its purpose and usage with HTTP health checks. These changes improve the robustness of the Ollama agent and enhance the clarity of the codebase.
- Improved error messages in the Ollama agent's Review method to provide clearer feedback for various HTTP status codes, including 400, 404, 401, and 500. - Added comprehensive tests for handling different error scenarios, including invalid model formats, network issues, and JSON parsing errors. - Enhanced the NDJSON parsing function to provide detailed error messages with line numbers and content previews for better debugging. These changes improve the robustness and user experience of the Ollama agent by ensuring clearer communication of errors and better test coverage.
- Updated the `selectRefineAgent` function to accept a configuration parameter for Ollama-specific settings, including the base URL. - Added tests to verify that the Ollama agent correctly uses the configured base URL and defaults to the standard URL when none is provided. - Implemented the `WithOllamaBaseURL` method to allow for dynamic base URL configuration for Ollama agents. - Enhanced existing tests to ensure proper functionality and configuration handling for the Ollama agent. These changes improve the flexibility and robustness of the Ollama agent's configuration, ensuring it can adapt to different environments and settings.
- Added tests to verify that the Ollama agent correctly applies various BaseURL configurations, ensuring it can handle different formats. - Included intentional nil config comments for clarity in tests involving the codex agent. - Improved test structure to skip tests when the Ollama agent is unavailable, enhancing robustness. These changes improve the testing coverage and reliability of the Ollama agent's configuration handling.
…g levels - Introduced multiple tests to validate the immutability and order independence of method chaining in the Ollama agent. - Added tests to ensure that reasoning levels are preserved through chaining and that all reasoning levels are covered. - Implemented edge case tests for handling empty and whitespace-only models, as well as various content scenarios in NDJSON parsing. - Enhanced tests for agentic mode combinations and their effects on chaining behavior. These changes significantly improve the test coverage and reliability of the Ollama agent's functionality, ensuring robust handling of method chaining and reasoning configurations.
…iolation tests - Refactored method chaining tests in the Ollama agent to use intermediate variables for better clarity and readability. - Added comprehensive tests for handling unexpected and malformed NDJSON schema violations, ensuring robust error handling. - Enhanced existing tests to verify Ollama agent configuration settings, including base URL and model. These changes improve the maintainability of the test suite and enhance the reliability of the Ollama agent's functionality.
- Expanded AGENTS.md to include comprehensive setup and configuration instructions for the Ollama agent, detailing installation, model selection, and troubleshooting steps. - Updated README.md to reflect the addition of the Ollama agent in the multi-agent support section and provided a configuration example. - Enhanced clarity on model requirements and limitations for the Ollama agent, ensuring users have clear guidance for setup and usage. These changes improve the documentation and usability of the Ollama agent within the RoboRev project.
- Introduced a new helper function, setupGitRepo, to streamline the initialization of git repositories in the Ollama E2E tests. - Replaced repetitive git initialization code across multiple test functions with calls to setupGitRepo, enhancing code readability and maintainability. - Added additional tests for handling various NDJSON input scenarios, ensuring robust error handling for missing fields and unexpected structures. These changes improve the structure and reliability of the Ollama E2E test suite, facilitating easier updates and better error management.
- Updated the IsAvailable method to ensure proper closure of the response body, logging any errors without failing the availability check. - Enhanced the Review method to handle potential read errors when processing the response body, providing clearer error messages for better debugging. These changes enhance the reliability and robustness of the Ollama agent's functionality, ensuring better resource management and error reporting.
- Added support for agentic mode in the Ollama agent, allowing it to send tools and execute an agent loop during reviews. - Updated the Review method to handle agentic mode, enabling the execution of tool calls and appending results to the conversation. - Introduced new tests to verify the behavior of agentic mode, including tool request inclusion and the execution of tool calls within the agent loop. - Enhanced the normalization of Ollama output to handle tool lines and NDJSON streams for consistent display. These changes significantly improve the functionality and testing coverage of the Ollama agent, ensuring robust handling of agentic operations.
- Changed the agent from "opencode" to "ollama" for direct HTTP API interaction with the local Ollama server. - Updated model specification to "qwen2.5-coder:32b" and removed deprecated agent settings. - Streamlined comments for clarity on model usage and configuration guidance. These changes enhance the configuration for better integration with the Ollama agent, ensuring improved functionality and usability.
- Commented out the previous model "qwen2.5-coder:32b" and set the new model to "qwen3-coder:30b". - Maintained existing configuration settings for the Ollama agent to ensure continued functionality. This change enhances the model used by the Ollama agent, potentially improving performance and capabilities.
- Updated the model from "qwen2.5-coder:32b" to "qwen3-coder:30b" in the configuration file. - Adjusted comments to provide clearer examples of available models and usage instructions. These changes ensure the configuration is up-to-date with the latest model offerings, enhancing the functionality of the Ollama agent.
- Introduced a helper function to clear the OLLAMA_HOST environment variable for deterministic tests. - Added new test cases to verify the behavior of ResolveOllamaBaseURL with various configurations, including empty and whitespace-only values, as well as the precedence of the OLLAMA_HOST environment variable over default settings. - Updated the ResolveOllamaBaseURL function to handle bare host:port formats and ensure proper HTTP prefixing. These changes improve the robustness and reliability of the Ollama base URL resolution process, enhancing test coverage and ensuring expected behavior across different configurations.
…odel settings - Streamlined the configuration file for the Ollama agent, enhancing comments for better understanding of model usage. - Updated the model specification to "qwen3-coder:30b" to align with the latest offerings. - Ensured that deprecated settings are removed for a cleaner configuration. These changes enhance the usability and clarity of the Ollama agent's configuration, ensuring users can easily understand and implement the latest model settings.
- Changed the model to "qwen3-coder:256k" and added "review_model" and "refine_model" for enhanced context handling. - Updated comments to clarify model usage and provide guidance on the new configurations. These changes improve the configuration's clarity and ensure it aligns with the latest model capabilities.
- Introduced new event builders for Ollama-style NDJSON, including content, tool usage, and done-only events. - Enhanced the stream formatter to process Ollama events, ensuring proper handling of content and tool calls. - Added unit tests for Ollama event handling to verify functionality and output in both TTY and non-TTY modes. These changes expand the capabilities of the stream formatter to support Ollama's event structure, improving integration and usability.
- Introduced a new method, tryProcessOllamaEvent, to streamline the handling of Ollama NDJSON events, improving code clarity and maintainability. - Enhanced the processLine function to utilize the new method for better event parsing. - Added unit tests for handling malformed Ollama input and verifying output in both TTY and non-TTY modes. These changes improve the robustness of the stream formatter's event handling and ensure comprehensive testing for various input scenarios.
… structures - Improved error handling in Ollama agent by properly checking read errors when reading error responses from the Ollama server - Added new test cases for parsing NDJSON streams with nested JSON structures - Tests cover nested objects in content and tool arguments - Tests include deeply nested structures to ensure robust parsing - These changes improve the reliability of Ollama agent when handling complex JSON responses
- Added a new fix_model entry set to "qwen3-coder:256k" for improved model handling. - Updated comments to clarify the usage of refine and fix models in the configuration. These changes enhance the clarity and functionality of the Ollama agent's model settings, ensuring better context management.
…nhance existing tests - Introduced a new test function, TestClassifyNetworkError, to validate the classification of various network errors encountered by the Ollama agent. - Enhanced existing tests for parsing nested JSON structures, ensuring proper handling of deeply nested content and tool arguments. - Updated test cases to improve coverage and reliability of error handling in network scenarios. These changes strengthen the robustness of the Ollama agent's error handling and parsing capabilities, ensuring better performance in real-world scenarios.
|
I'll take a closer look at this when I can, but your branch contains a number of changes (such as additions to .roborev.toml) that need to be removed, and I'll have to review whether the AGENTS.md changes make sense. Either way AGENTS.md/CLAUDE.md changes belong in a separate PR |
…main application - Updated various test functions to handle errors more gracefully, ensuring that decoding and encoding operations do not panic on failure. - Enhanced resource management by using deferred functions to close database connections and response bodies safely. - Improved clarity in test setups by ensuring proper cleanup of environment variables and directories. These changes enhance the robustness and reliability of the application and its tests, ensuring better error handling and resource management.
|
Sorry, I missed those files when I was cleaning up. Files removed. |
|
Just letting you know that I see this and I got flooded with stuff related to msgvault this week, but I will have a close look at this when I can! I want to try out the new Qwen open weights model, too, so that is a good excuse. |
Second try at Issue #128 , new implementation can use tools and was used to address 7aa92bd .