Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds WASM (WebAssembly) support to the Flock DuckDB extension, along with Anthropic/Claude provider support, audio transcription capabilities, a metrics system, and various refactoring improvements. The title "Added WASM support" undersells the scope of changes.
Changes:
- Adds Anthropic provider (Claude models) with completion, image support, and structured output via
output_format/tool_use - Adds audio transcription support for OpenAI and Azure providers, with a
TranscribeAudioColumnpipeline inPromptManager - Introduces a metrics tracking system (
MetricsManager) withflock_get_metrics,flock_get_debug_metrics, andflock_reset_metricsSQL functions - Adds WASM HTTP support via
EM_JS/XMLHttpRequestand conditionally excludes CURL for Emscripten builds - Refactors scalar/aggregate function binding to use
LlmFunctionBindData(bind-time model resolution) and removes staticmodel_details/user_querymembers
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/model_manager/providers/adapters/anthropic.cpp |
New Anthropic provider adapter implementation |
src/include/flock/model_manager/providers/handlers/anthropic.hpp |
New Anthropic handler (completion, structured output, token extraction) |
src/model_manager/providers/handlers/wasm_http.cpp |
WASM HTTP layer using EM_JS synchronous XHR |
src/include/flock/model_manager/providers/handlers/url_handler.hpp |
New URL/file helper for downloading and base64-encoding files |
src/prompt_manager/prompt_manager.cpp |
Adds TranscribeAudioColumn, audio column handling in Render |
src/model_manager/model.cpp |
Adds transcription, GetModelDetailsAsJson, ResolveModelDetailsToJson, mock factory |
src/metrics/metrics.cpp / src/metrics/registry.cpp |
New metrics system implementation and SQL function registration |
src/include/flock/metrics/*.hpp |
Metrics data structures, base manager template, manager class |
src/functions/scalar/*.cpp / src/functions/aggregate/*.cpp |
Refactored to use LlmFunctionBindData bind-time model resolution |
src/secret_manager/secret_manager.cpp |
Adds Anthropic secret type |
src/core/config/config.cpp |
WASM path detection, StorageAttachmentGuard, CREATE SCHEMA IF NOT EXISTS |
src/core/config/model.cpp / prompt.cpp |
CREATE TABLE IF NOT EXISTS, INSERT OR IGNORE |
src/include/flock/model_manager/providers/adapters/anthropic.hpp |
New Anthropic adapter header |
test/** |
New tests for Anthropic, transcription, llm_filter without context columns, metrics |
CMakeLists.txt |
Conditional CURL linking, WASM test exclusion |
.github/workflows/MainDistributionPipeline.yml |
Pins to v1.4.4, removes WASM arch exclusions, adds code quality check |
docs/** |
Anthropic usage guide, updated API key docs, build-from-source instructions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@anasdorbani I've opened a new pull request, #240, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@anasdorbani I've opened a new pull request, #243, to work on those changes. Once the pull request is ready, I'll request review from you. |
# Conflicts: # README.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Added WASM support.