Skip to content

Conversation

@anasdorbani
Copy link
Member

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.

Copilot AI review requested due to automatic review settings December 16, 2025 19:53
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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(), and flock_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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant