Skip to content

Commit 48dafc4

Browse files
committed
Sync to upstream v0.61.4
2 parents 98efcc9 + 143faf7 commit 48dafc4

134 files changed

Lines changed: 6127 additions & 723 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clj-kondo/config.edn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@
254254
(metabase.util.match/match-many)
255255
(metabase.util.match/replace-in)
256256
(metabase.util.match/replace)
257-
(metabase.driver-api.core/match)
258257
(metabase.driver-api.core/match-one)
259258
(metabase.driver-api.core/match-many)
260259
(metabase.driver-api.core/replace)

.clj-kondo/config/modules/config.edn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@
166166
llm
167167
metabot
168168
queries
169+
query-permissions
169170
query-processor
170171
request
171172
server

.clj-surgeon.edn

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{:aliases
2+
{;; defendpoint shape: (api.macros/defendpoint METHOD URL DOCSTRING? [args] body)
3+
;; No name slot — synthesize :route [METHOD "path"] from first 2 args.
4+
"defendpoint"
5+
{:fields {:method (fn [z] (some-> z z/down z/right z/sexpr name str/upper-case))
6+
:path (fn [z] (-> z z/down z/right z/right z/sexpr))}}
7+
8+
;; defenterprise shape:
9+
;; (defenterprise NAME DOCSTRING? EE-NAMESPACE [args] body)
10+
"defenterprise"
11+
{:fields {:name ->defn-name
12+
:ee-namespace (fn [z]
13+
;; Skip name + optional docstring; the next
14+
;; symbol is the EE namespace.
15+
(let [name-z (-> z z/down z/right)
16+
after-doc (z/right name-z)
17+
candidate (if (string? (try (z/sexpr after-doc)
18+
(catch Exception _ nil)))
19+
(z/right after-doc)
20+
after-doc)]
21+
(try (let [v (z/sexpr candidate)]
22+
(when (symbol? v) v))
23+
(catch Exception _ nil))))
24+
:arglist ->defn-arg-list}}
25+
26+
"defsetting"
27+
{:fields {:name ->defn-name}}}}

.github/workflows/backend.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
# Master / release safety net: lint every backend test namespace.
4141
if: ${{ !inputs.skip && github.event_name == 'push' && (github.ref_name == 'master' || startsWith(github.ref_name, 'release-')) }}
4242
runs-on: ${{ vars.DEFAULT_RUNNER_KEY }}
43-
timeout-minutes: 30
43+
timeout-minutes: 45
4444
name: Eastwood (tests only)
4545
steps:
4646
- uses: actions/checkout@v4

bb.edn

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
;; we put path as bin, and everything is in the ./mage subdirectory,
33
;; so the namespaces are mage.cli, mage.format, etc.
44
:paths ["mage/src" "mage/test" "bin/lint-migrations-file/src"]
5-
;; use Cam's fork temporarily until a new release with https://github.com/weavejester/cljfmt/pull/420 is cut
6-
;; (release > 0.16.4)
7-
:deps {dev.weavejester/cljfmt {:git/sha "05886be17744846685e6a733973fdfbd24e1acd5"
8-
:git/url "https://github.com/camsaul/cljfmt"} ;; run cljfmt from bb
5+
;; use Git version of dep temporarily until a new release > 0.16.4 is cut
6+
:deps {dev.weavejester/cljfmt {:git/sha "075eae26e3c8dad433b88f05927bcd50e3571328"
7+
:git/url "https://github.com/weavejester/cljfmt"} ;; run cljfmt from bb
98
io.github.paintparty/bling {:mvn/version "0.8.8"} ;; printing bells and whistles
109
medley/medley {:mvn/version "1.3.0"} ;; utilities
1110
metosin/malli {:mvn/version "0.17.0"} ;; data validation

bun.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ Metabase's reference documentation.
158158
- [Agent API](./ai/agent-api.md)
159159
- [MCP server](./ai/mcp.md)
160160
- [Metabot in Slack](./ai/metabot-slack.md)
161+
- [AI privacy](./ai/privacy.md)
161162

162163
### Exploration and organization
163164

docs/ai/mcp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ A first-time connection will go something like this:
7070
3. You're redirected to Metabase to log in (if you aren't already) and approve the connection.
7171
4. The client receives an access token scoped to the permissions you have in Metabase.
7272

73-
Results returned by the MCP server are sent to your MCP client, which may forward them to an AI provider depending on how the client is configured. See [Privacy](./settings.md#privacy).
73+
Results returned by the MCP server are sent to your MCP client, which may forward them to an AI provider depending on how the client is configured. See [AI privacy](./privacy.md).
7474

7575
### Site URL must match the URL your client uses
7676

docs/ai/privacy.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: AI privacy
3+
summary: What data Metabase sends to AI providers and MCP clients when you use AI features, and what Metabase the company collects.
4+
---
5+
6+
# AI privacy
7+
8+
AI in Metabase is optional.
9+
10+
If you do use AI (which you can set up in [AI settings](./settings.md)), we need to send some data outside of your Metabase. This page covers what gets sent, and to whom.
11+
12+
## Data sent to the Metabase AI service
13+
14+
When using the Metabase AI service, we don't send the _results_ of your queries to a third-party AI provider, and we don't look at them ourselves.
15+
16+
What we send:
17+
18+
- Your prompts.
19+
- Metadata (like table and field names), so Metabot knows what to query.
20+
- A sampling of field values from your database. For example, if you ask Metabot to "Filter everyone from Wisconsin," it might check the values in the state field to see how the data is stored (like "WI" vs "Wisconsin"). See [syncs](../databases/sync-scan.md).
21+
- For chart analysis, AI won't see the raw timeseries data, but it does see some metrics derived from that data (like slopes, series correlations, etc). AI may also see some categorical values. For example, if a question breaks out orders over time by a product category, the AI could see the category values ("Gadgets", "Widgets", etc).
22+
23+
We, Metabase the company, also collect some of this metadata to gauge usage and improve the AI integration.
24+
25+
## Data sent to your own AI provider
26+
27+
If you're using your own API key, everything listed above is sent to your selected AI provider. Review your provider's data handling and privacy policies.
28+
29+
## Data sent to the MCP client
30+
31+
When using the [MCP server](./mcp.md), query _results_ are sent to the connected MCP client.
32+
33+
## Data sent when submitting feedback
34+
35+
If you [submit feedback](./metabot.md#giving-feedback-on-metabot-responses) on a Metabot response, the context for that conversation, including metadata and your prompts, might be sent to Metabase the company, and may contain sensitive data.
36+
37+
## Further reading
38+
39+
- [AI settings](./settings.md)
40+
- [Using Metabot](./metabot.md)
41+
- [MCP server](./mcp.md)
42+
- [Privacy and GDPR](../installation-and-operation/privacy.md)

docs/ai/settings.md

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ AI features are available on both Metabase Cloud and self-hosted Metabase. To tu
2121
- Another supported provider. See [bring your own API key](#bring-your-own-api-key).
2222
3. Once connected, configure [Metabot](#configure-metabot) and other AI features below.
2323

24-
> The Metabase AI add-on only appears in your Metabase Store account after you've connected to the Metabase AI service in **Admin settings > AI**. If you're on a Pro trial and don't see the add-on in **Manage plan**, connect it from Admin first; the Store will reflect it after.
25-
2624
## Choose AI provider
2725

2826
_Admin > AI_
@@ -42,8 +40,6 @@ Metabase's AI Service is a good option if you don't have a preferred AI provider
4240

4341
If you use Metabase's AI Service, you'll get charge based on token usage (in addition to your regular Metabase Cloud subscription fee). See [Pricing](https://www.metabase.com/pricing).
4442

45-
To enable Metabase's AI Service on Metabase Cloud, you must me logged in to your Metabase instance with the email that matches the email for the admin of your [Metabase Store account](https://store.metabase.com).
46-
4743
To use Metabase AI provider for your Metabot:
4844

4945
1. Go to **Admin > AI > AI settings**.
@@ -56,8 +52,6 @@ To disable Metabase AI provider and stop charges:
5652
1. Go to **Admin > AI > AI settings**.
5753
2. Under **Connected to Metabase**, click **Disconnect**.
5854

59-
Any Metabase instance admin can disconnect the Metabase AI Service, even if they lack an admin account in the Metabase store.
60-
6155
### Bring your own API key
6256

6357
You can specify your own API key and model for Metabot from one of the supported providers. Currently, Metabase only supports models from Anthropic.
@@ -193,28 +187,11 @@ If you're using your own API key, you can track usage and costs through your AI
193187

194188
On Metabase Pro/Enterprise, you also get access to detailed [AI usage auditing](usage-auditing.md) with detailed breakdown of AI usage by user, tool, feature etc.
195189

196-
## Privacy
197-
198-
When using the Metabase AI service, your questions and conversations remain private to your Metabase -- we don't send your data to external services. We do collect some metadata to gauge and improve usage.
199-
200-
If you're using your own API key, your prompts and data are sent to your selected AI provider. Review your provider's data handling and privacy policies. When using the [MCP server](./mcp.md), query results are sent to the connected MCP client.
201-
202-
In both cases, Metabot can't create assets or write data. If you [submit feedback](./metabot.md#giving-feedback-on-metabot-responses), the form you send may contain sensitive data from your conversation.
203-
204-
### What Metabot can see
205-
206-
Metabot has access to your Metabase metadata and some data values to help answer your questions:
207-
208-
- **Table, Question, Model, Dashboard, and Metric metadata**: Metabot can see the structure and configuration of your content.
209-
- **Sample field values**: When you ask questions like "Filter everyone from Wisconsin," Metabot might check the values in the state field to understand how the data is stored (like "WI" vs "Wisconsin"). See [syncs](../databases/sync-scan.md).
210-
- **Timeseries data**: For chart analysis, Metabot might see the timeseries data used to draw certain visualizations, depending on the chart type.
211-
212-
When you [submit feedback](./metabot.md#giving-feedback-on-metabot-responses), the context for the conversation - including this metadata and conversation prompts - might be sent to Metabase.
213-
214190
## Further reading
215191

216192
- [Using Metabot](metabot.md)
217193
- [MCP server](mcp.md)
194+
- [AI privacy](privacy.md)
218195
- [AI access and usage controls](usage-controls.md)
219196
- [AI usage auditing](usage-auditing.md)
220197
- [Metabot customization](customization.md)

0 commit comments

Comments
 (0)