Fix duplicate check for CREATE MODEL and CREATE PROMPT#224
Merged
anasdorbani merged 1 commit intodais-polymtl:devfrom Feb 18, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
The PR adds audio transcription support to the Flock extension, along with comprehensive test coverage and a new metrics tracking system. It enables CREATE MODEL and CREATE PROMPT commands to properly detect duplicates across global and local scopes.
Key Changes:
- Added audio transcription functionality for OpenAI models with
gpt-4o-mini-transcribe - Implemented a metrics tracking system with
flock_get_metrics(),flock_get_debug_metrics(), andflock_reset_metrics()functions - Enhanced test coverage across scalar and aggregate LLM functions
- Modified model providers to support transcription requests and improved image handling
Reviewed changes
Copilot reviewed 99 out of 102 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/prompt_manager/prompt_manager_test.cpp | Added tests for audio transcription column handling |
| test/unit/model_manager/model_providers_test.cpp | Updated model name and added transcription tests |
| test/unit/model_manager/model_manager_test.cpp | Updated model name reference |
| test/unit/functions/scalar/metrics_test.cpp | New comprehensive metrics tracking tests |
| test/unit/functions/scalar/llm_function_test_base_instantiations.cpp | Added Ollama secret creation |
| test/unit/functions/scalar/llm_filter.cpp | Added audio transcription tests and updated type casts |
| test/unit/functions/scalar/llm_embedding.cpp | Updated type casts from TEXT to VARCHAR |
| test/unit/functions/scalar/llm_complete.cpp | Added audio transcription tests and updated type casts |
| test/unit/functions/mock_provider.hpp | Added mock methods for transcription |
| test/unit/functions/aggregate/llm_*.cpp | Added audio transcription tests and improved test structure |
| test/unit/functions/aggregate/llm_aggregate_function_test_base.hpp | Updated mock provider setup with factory pattern |
| test/integration/src/integration/tests/**/*.py | Added with_secrets parameter to all CLI calls |
| test/integration/src/integration/setup_test_db.py | Simplified setup by removing secret creation logic |
| test/integration/src/integration/conftest.py | Added secret injection and audio file path helper |
| src/registry/scalar.cpp | Registered new metrics functions |
| src/prompt_manager/prompt_manager.cpp | Added audio transcription support and null handling |
| src/model_manager/providers/adapters/*.cpp | Updated to support transcription and improved media handling |
| src/model_manager/model.cpp | Enhanced model details resolution and added transcription methods |
| src/metrics/*.cpp | New metrics tracking implementation |
| src/include/flock/**/*.hpp | Updated headers for new functionality |
Comments suppressed due to low confidence (3)
test/unit/model_manager/model_providers_test.cpp:1
- The model version 'gemma3:4b' does not exist. The Gemma model family uses version numbers like 'gemma:2b', 'gemma:7b', or 'gemma2:2b'. This should be changed to an existing Gemma model version.
test/unit/model_manager/model_manager_test.cpp:1 - The model version 'gemma3:4b' does not exist. The Gemma model family uses version numbers like 'gemma:2b', 'gemma:7b', or 'gemma2:2b'. This should be changed to an existing Gemma model version.
test/integration/src/integration/tests/secret_manager/test_secret_manager.py:1 - The secret name changed from 'test_openai_secret' to 'test_persistent_lifecycle_secret', but this creates potential naming conflicts with other tests. Consider using a more unique name like 'test_persistent_secret_lifecycle' to better indicate its purpose and avoid conflicts.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7a6288f to
6c37966
Compare
queryproc
approved these changes
Feb 18, 2026
anasdorbani
added a commit
that referenced
this pull request
Mar 3, 2026
anasdorbani
added a commit
that referenced
this pull request
Mar 3, 2026
anasdorbani
added a commit
that referenced
this pull request
Mar 10, 2026
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.
CREATE MODEL and CREATE PROMPT commands were not properly detecting duplicates when a model/prompt already existed in a different table (global vs local). This allowed duplicate creations to succeed, showing "created successfully" for both attempts.