fix: handle tables without uid column and remove hardcoded temperature - #104
Conversation
- fetchRecordsAction now checks for uid column before querying, returning empty results for tables with incomplete schemas - testModelAction no longer sends temperature=0, which was rejected by reasoning models that only support temperature=1 Fixes #102 Fixes #103 Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the robustness and compatibility of the system by addressing two key issues. It introduces a check to gracefully handle database tables that may lack a Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Automated approval for solo maintainer project
This PR has passed all automated quality gates:
- ✅ Static analysis (PHPStan)
- ✅ Code style (PHP-CS-Fixer)
- ✅ Unit & functional tests
- ✅ Security scanning
- ✅ Dependency review
See SECURITY_CONTROLS.md for compensating controls documentation.
There was a problem hiding this comment.
Code Review
This pull request aims to improve fetchRecordsAction by checking for a uid column and removes a hardcoded temperature parameter in testModelAction. However, a critical security vulnerability exists in fetchRecordsAction within TaskController.php due to the use of untrusted input for table names without proper validation, which could lead to unauthorized data access. Furthermore, the new schema check in fetchRecordsAction could be made more efficient by avoiding a potential duplicate database query.
There was a problem hiding this comment.
Pull request overview
Fixes two backend AJAX edge cases in the TYPO3 nr_llm extension: querying tables with incomplete schemas (missing uid) and testing “reasoning” models that reject non-default temperature settings.
Changes:
- Add a schema guard in
TaskController::fetchRecordsAction()to return an empty result when the selected table has nouidcolumn (fixes #102). - Remove the hardcoded
temperature=0.0fromModelController::testModelAction()to avoid failures on reasoning-only temperature models (fixes #103). - Bump extension version to
0.4.3.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
ext_emconf.php |
Bumps extension version to 0.4.3. |
Classes/Controller/Backend/TaskController.php |
Adds pre-query schema check for missing uid and returns empty records instead of erroring. |
Classes/Controller/Backend/ModelController.php |
Removes hardcoded temperature from model test request options. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
uidcolumn before querying, returning empty results for tables with incomplete schemas (e.g.tx_scheduler_taskwhen scheduler isn't installed but nr_vault adds columns). Fixes bug: fetchRecordsAction crashes on tables without uid column #102temperature=0, which was rejected by reasoning models (GPT-5.2, o3) that only supporttemperature=1. Fixes bug: Model test hardcodes temperature=0, fails on reasoning models #103Test plan