Commit Graph
52 Commits
Author SHA1 Message Date
Davide Silvestri 0bb39e36c6 [1/4] feat: AI assistant eval platform on self-hosted Phoenix (#5958)
* feat: add Phoenix LLM tracing service to the dev stack (ai profile)

* chore(deps): add openinference pydantic-ai instrumentation (dev)

* feat: export assistant traces to Phoenix when BASEROW_ASSISTANT_PHOENIX_URL is set

* fix: harden Phoenix tracing setup after review

* feat: Phoenix postgres storage, ai-evals profile and auth support

* docs: ADR 007 and assistant tracing/evals guides

* feat: assistant eval platform core (types, registries, scenarios)

* feat: eval harness with shared assistant factory

* feat: phoenix dataset sync for assistant evals

* feat: assistant eval experiments via phoenix client + CLI

* feat: migrate core, database and docs evals to the platform

Ports the 42 kuma-core/kuma-database/kuma-docs pytest evals into
declarative EvalCase/EvalScenario registrations, plus structure-level
tests asserting dataset counts, ids, and scenario wiring.

* feat: migrate builder and automation evals to the platform

Ports the 12 builder + 2 proactive + 2 user-source cases into
evals/datasets/builder.py (kuma-builder, 16 cases) and the 7 automation
cases into evals/datasets/automation.py (kuma-automation), following the
Task 5 pattern established in core.py/database.py. Extends
eval_platform/test_datasets.py with counts, id lists, a mode-per-case
assertion, and pre_state snapshot checks for the two cases that need one.

* fix: link traces and final counts for single-case eval runs

* fix: root spans for single-case eval runs use the assistant tracer provider

* feat: assistant eval runner service with run page

Adds the assistant_eval_runner management command (migrate -> instrumentation
-> dataset sync -> single worker thread -> wsgiref server) and its
runner.py module: a stdlib WSGI app serving a plain server-rendered page
(GET /, POST /run, GET /healthz) backed by a bounded in-memory run history
and one background worker draining a queue.Queue via run.run_experiment_for.

Wires the assistant-eval-runner compose service (ai-evals profile, own
baserow_evals DB), renames phoenix-db-init to ai-evals-db-init and extends
it to also create baserow_evals, and adds BASEROW_EVAL_RUNNER_PORT to both
env example files and the dev docs.

* fix: eval runner integration fixes

assistant-eval-runner needs its own SECRET_KEY/DATABASE_*/REDIS_* env vars:
dev-overlay compose services don't inherit docker-compose.yml's
x-backend-variables anchor (that's file-scoped YAML), so the container was
starting without a Django SECRET_KEY and without a Redis password, crashing
on auth. Also links to finished experiments pointed at the container-internal
BASEROW_ASSISTANT_PHOENIX_URL (http://phoenix:6006), unreachable from the
developer's browser.

Adds BASEROW_ASSISTANT_PHOENIX_PUBLIC_URL (defaulting to
http://localhost:${BASEROW_PHOENIX_PORT:-6060}) and has runner.py build the
Phoenix link from it, deep-linking straight to the finished run's experiment
compare view when its dataset_id/experiment_id are known, falling back to
the datasets list otherwise.

* refactor: retire the pytest eval harness

All 65 eval cases now live in baserow_enterprise.assistant.evals.datasets;
delete the legacy pytest-based suite and its `eval` markers.

* docs: rewrite assistant evals guide for the Phoenix platform

* feat: docs judge, prompt sync, git stamping and UI-contributed eval examples

- answer_quality LLM-as-judge evaluator for kuma-docs (BASEROW_EVAL_JUDGE_MODEL)
- Kuma prompts versioned into Phoenix on sync; experiments stamped with
  prompt hashes, git branch/commit and judge model
- sync preserves UI-added dataset examples with prompt-match adoption;
  eval-export emits paste-ready docs.py snippets
- final-review fixes: skip-safe scoring, runner CSRF/bind hardening,
  doc corrections

* feat: eval runner UI round — tabs, fan-out, reference answers, 64-case docs dataset

- Runner page: dataset tabs with selection badges, per-dataset and global
  all/none, cross-dataset fan-out (one experiment per dataset), 5s
  auto-refresh of runs, persistent run history across restarts, per-dataset
  Phoenix links, in-page Help tab rendering the repo docs via /docs.json.
- Reference answers for kuma-docs: EvalCase.reference_answer, judge grades
  against it, sync preserves UI-curated ones, eval-export round-trips them.
- kuma-docs grown to 64 cases: reference answers for all, PostHog-mined
  frequent questions, and cannot-do guardrail cases.
- Gemini (google:gemini-3.6-flash) in the eval model list.

* feat: runnable UI examples, prompt overrides, eval baseline and results view

- UI-added Phoenix examples now execute: docs questions get the standard
  docs checks + judge; tool cases declare scenario/expected_tools/
  answer_contains in metadata (empty-workspace default scenario). They are
  tickable per dataset on the runner page and run in whole-dataset
  experiments too.
- Prompt overrides: run any experiment with a prompt's latest Phoenix
  version instead of the code constant (runner checkbox panel with soft
  per-tab ordering, or --override-prompt). Agent singletons keep their
  dynamic instructions; effective hashes + override list stamped on the
  experiment.
- Committed baseline snapshot (evals/baseline.json, 111 cases) with
  just b eval-baseline capture/import; the runner imports it on startup so
  every Phoenix instance gets a baseline experiment per dataset,
  idempotent by content hash and run count.
- Results tab: all datasets in one view for a named experiment, with
  baseline deltas and a case-weighted overall row, via Phoenix experiment
  annotation summaries.
- New evaluation guide (docs/testing/ai-assistant-eval-analysis.md) served
  in the Help tab; layout uses horizontal space better (single tab row,
  fluid case columns).

* feat: time and cost in eval results, frozen into the baseline snapshot

- Results tab gains time (sum of run latencies) and cost/token columns per
  dataset and summed overall, with lower-is-better baseline deltas.
- eval-baseline capture freezes each dataset's time/cost/token totals into
  baseline.json; import stamps them as metadata so imported baselines
  (which carry no traces to price) still show time and cost.
- Importing a new baseline supersedes the previously imported one instead
  of accumulating duplicates.
- Changelog entry for the eval platform.

* fix: OpenInference attributes on subset-run task root spans

Bare wrapper spans rendered as kind 'unknown' with Unset status and empty
input/output in Phoenix. The Task root span now carries the CHAIN kind, the
case prompt as input, the run result as JSON output, and an explicit OK
status.

* polish; minor fixes

* fix: address eval platform review feedback

Apply production model settings and retries, isolate automation checks, and fix runner configuration, links, and result status.

Defer GPT-5.6 compatibility and baseline comparisons to #6034.

* fix: preserve model profiles in rebased eval harness

Use an explicit model profile for evals and share concrete models with tools. Manage model clients through the existing lifecycle helper and preserve regression coverage from the retired harness.

* fix: harden eval persistence and Phoenix access
2026-09-09 17:06:07 +02:00
Jérémie PardouandTsering Paljor 40c18a3c9f feat: add separate domain for preview (#5682)
Co-authored-by: Tsering Paljor <tsering@baserow.io>
2026-09-09 08:53:47 +02:00
Davide Silvestri e6f2a44e85 chore: scale OpenTelemetry sampling and preserve traffic metrics (#5726)
* feat: scale OpenTelemetry sampling and metrics

* feat: add per-user invitation metric

* fix: monitor every queue in OpenTelemetry

* docs: explain retaining every eligible trace

* feat: retain all eligible traces with -1

* fix: address feedback; trace ActionType.do and several important handlers methods
2026-07-22 11:57:11 +02:00
Jérémie Pardou a1b92d682d task: add multiple instances support (#5541) 2026-06-22 17:43:59 +02:00
Jérémie Pardou 30906040c6 feat: allow to configure CERT requirement for Redis (#4930)
* Add missing part in the redis  url
2026-03-05 17:07:39 +01:00
Bram bdd59fe2e5 Split Frontend and Storybook in dev (#4793) 2026-02-18 18:43:18 +01:00
Bram 25abde9cf8 Remove local Baserow mount (#4757) 2026-02-16 15:33:37 +01:00
Jérémie Pardou ee21b017f2 Fix more frontend unit tests after nuxt migration (#4591) 2026-02-09 10:52:47 +01:00
Jonathan Adeline 5ceae6c70a Nuxt3 migration continue (#4578)
* fix nuxt.test.config for saas

* add .nuxtrc

* Enhance Nuxt configuration to ignore sourcemaps from node_modules

* Add nuxt-prepare command to docker-entrypoint.sh for generating .nuxt directory

* Refactor license.vue to use Composition API

* Add korean language support

* Add impersonate middleware to dashboard and workspace pages

* Mount local backend/media folder in docker-compose for Caddy to serve uploaded files during development

* Fix invitation related issues

* Update email configuration for local development with Mailhog integration

* Add moment-guess to optimizeDeps in Nuxt configuration to pre-bundle and avoid missing source map warnings

* Refactor login components to use Composition API and improve routing structure for login pages

* Update sidebar user context to conditionally display workspace creation option based on user permissions

* Centralize locale definitions in a new config file

* please linter
2026-01-27 20:06:43 +04:00
Davide Silvestri 5d3c90f9f6 chore (AI-Assistant): add embeddings to docker-compose.dev.yml; improve installation docs (#4563)
* chore (AI-Assistant): add embeddings to docker-compose.dev.yml; improve installation docs

* Fix flaky test

* Address feedback

* Fix just dev down to stop all services
2026-01-23 14:08:08 +01:00
Petr Stříbný 3f95309b30 Upgrade to Postgres 14 and Django 5.2.X (#4584) 2026-01-23 13:17:23 +01:00
716d43a9a8 Nuxt 3 migration (#4342)
Update the nuxt3 version.

Co-authored-by: Jonathan Adeline <jonathan@baserow.io>
Co-authored-by: Bram Wiepjes <bramw@protonmail.com>
Co-authored-by: Cezary <cezary@baserow.io>
Co-authored-by: Tsering Paljor <tsering@baserow.io>
Co-authored-by: Przemyslaw Kukulski <przemyslaw+gh@baserow.io>
Co-authored-by: Bram <bram2w@users.noreply.github.com>
2026-01-22 10:27:19 +01:00
Davide Silvestri 80502fee12 chore (CI): fix all-in-one image build (#4552)
* Fix versions in dockerfiles; remove all-in-one-dev

* Add manual trigger to build all-in-one image

* add build_args for all-in-one images
2026-01-19 14:15:54 +01:00
Davide Silvestri e25988ea0d chore: switch to uv and justfile (#4369)
* create backend justfile; switch to uv

* Add deploy and dc-deploy recipes to build images

* Add uv.lock for reproducible builds

* CI fixes + improvements

* Reduce build time

* improve CI caching

* Improve exit early conditions

* Set requires_python==3.11.*; add backend/media to gitignore

* Fix all-in-one Dockerfiles and some other fixes

* Introduce frontend justfile + some other useful recipes

* Fix permissions issue with dev containers

* Improve dockerfiles and docs on how to use the dev env

* Fix mjml-email-compiler service

* Update docs + address feedback

* Fix containers healthchecks

* Fix yarn test in dev container

* Minor fixes to docs and justfile attach command

* Address Petr's feedback

* Address additional feedback

* Add changelog entry

* Address feedback: Petr and Przemek

* address feedback + prepare for saas PR

* minor fixes

* Address Bram's feedback 2
2026-01-15 11:22:22 +01:00
Davide Silvestri 05fd7bba0a chore: dynamically import backend library to reduce memory footprint and startup time (#4315)
* lazy imports

* Fix tests

* Add warning checks for libraries that should be lazy imported

* Address feedback
2025-12-23 13:34:41 +01:00
Jérémie Pardou 3988349cd7 Add iterator node (#4099)
* Refactor the graph
* Many other stuff
2025-10-29 09:50:34 +01:00
Davide Silvestri 04902dcb46 AI Assistant 2/3: Add knowledge retrieval tool 2025-10-14 10:12:42 +02:00
Bram Wiepjes caa64d2415 Updated backend and frontend dependencies 2025-09-29 2025-09-29 13:58:20 +00:00
Davide Silvestri bb248241dd Remove obsolete compose version 2025-07-16 16:00:27 +02:00
Bram Wiepjes 8f00743c4b [2/5] Query performance improvements: Improve view field change type performance by doing operations in bulk 2025-01-20 09:05:05 +00:00
Bram Wiepjes 497d67db91 Automatically start storybook in dev environment 2024-08-06 17:47:23 +00:00
Bram Wiepjes e63565b9f5 Introduce Celery Flower 2024-06-25 11:35:04 +00:00
Cezary Statkiewicz 182a2c05eb Fix/2494 python version review 2024-05-24 07:16:57 +00:00
Petr Stribny ea86f3f986 Improve local postgres performance 2024-05-06 08:06:03 +00:00
Eimantas Stonys 24a4708323 Upgrade to PostgreSQL 15 2024-04-03 08:04:17 +00:00
Peter Evans d490817847 Re-add node_modules as a volume 2024-01-16 12:30:54 +00:00
Bram Wiepjes 9af6b0b02f Fix Sentry env var in the web-frontend 2024-01-15 14:34:48 +00:00
Jonathan Adeline a8f55c51ca Storybook 2023-11-10 13:20:57 +00:00
Alexander Haller fbf463a864 Resolve "Move formula language partially into own module" 2023-06-15 10:28:18 +00:00
Nigel Gott 2bbb22be2f Resolve "Export useful opentelemetry metrics." 2023-03-03 16:58:45 +00:00
Nigel Gott b3d9b6a417 Resolve "Disable SILKY_ANALYZE_QUERIES by default in developer env as it causes double data updates" 2023-02-21 06:04:18 +00:00
Nigel Gott 5ae364f6f9 Resolve "Caddy healthcheck is leaking memory" 2023-01-26 12:35:41 +00:00
Nigel Gott 53b6969b37 Resolve "Also check role assignments when deciding if a user is free" 2022-12-19 17:50:44 +00:00
Nigel Gott ea38da6402 Resolve "Soft Limit for Enterprise Seats" 2022-10-31 15:00:41 +00:00
Jeremie Pardou-Piquemal 2f34b99fb9 Add enterprise plugin 2022-09-22 10:00:59 +02:00
Nigel Gott f4a94ee5a9 Resolve "Update Plugin boilterplate and docs to match new docker usage" 2022-07-03 17:28:50 +00:00
Nigel Gott 02acea9778 Various self-hosting QOL fixes 2022-07-01 15:43:28 +00:00
Bram Wiepjes 7e3fc3382c Resolve "The model cache sometimes result into an UnpicklingError" 2022-04-19 09:50:23 +00:00
Davide Silvestri ccabf86685 Improve debugging for frontend and backend 2022-04-13 07:56:43 +00:00
Nigel Gott 7f8021abab Switch dev mode to how it worked before, fix celery beat throwing errors on... 2022-03-03 14:12:20 +00:00
Nigel Gott 13bb140618 Add all-in-one image used as a base by cloudron/heroku.
Signed-off-by: Nigel Gott <nigel@baserow.io>
2022-02-28 13:56:55 +00:00
Nigel Gott 56549afd1c pre-compile mjml email templates and delete runtime mjml-tcpserver for enhanced security, reduced architectural complexity and faster/simpler email setup. 2022-02-28 13:21:17 +00:00
Nigel Gott 241958a8ab Setup Baserow to build its images in CI for Gitlab. 2022-02-28 13:19:00 +00:00
Erwan Daubert 0128d06c47 Change the way variables are used (no substitution as empty value will be the default result) 2021-12-15 12:26:02 +00:00
Nigel Gott 02fd24fbaa Resolve "Allow configuring base premium path" 2021-11-24 14:44:02 +00:00
Nigel Gott a66653b9f1 Resolve "Disable repeat formula function for now" 2021-11-24 13:45:20 +00:00
Nigel Gott 6f02b38dbc Ensure local node_modules are ignored from the docker builds so docker runs always get the correct latest yarn installed modules instead of something out of date. 2021-07-29 15:46:39 +01:00
Nigel Gott af96c3d730 Various docker fixes:
- Dont use a named volume to store node_modules in the dev
env to always get a fresh image based node_modules
- Fix the PUBLIC_WEB_FRONTEND_URL mis config in the docker-compose file
- Update docs for publicly exposing baserow
- Fix bad link in docs
2021-07-29 10:11:55 +01:00
Nigel Gott 9103f8e81d Resolve "Don't expose ports for debugging purposes by default in docker-compose.yml" 2021-07-15 09:15:44 +00:00
Nigel Gott b724d72294 Resolve "Export table/view data to CSV/XML/JSON" 2021-06-01 09:30:30 +00:00