Tag genie ask requests with databricks_cli source and disable viz#5988
Tag genie ask requests with databricks_cli source and disable viz#5988yansonggao-db wants to merge 3 commits into
Conversation
|
@lennartkats-db this is the CLI side of the Genie-One-in-CLI work — |
ab82edf to
f64d9e2
Compare
`databricks experimental genie ask` now sends a `source: "databricks_cli"` field on the OneChat /responses request so the backend can attribute CLI traffic distinctly (vs webapp/Slack/MCP), and sends `enable_viz: false` because the CLI renders in a terminal that cannot display charts. - GenieRequest gains Source (string) and EnableViz (*bool, so false serializes past omitempty) fields. - BuildRequest sets both unconditionally; neither is user-configurable. - Updates the wire-format test and adds a test pinning both fields.
f64d9e2 to
72a1f44
Compare
|
✅ approved, recreating here for CI purposes => #6056 |
|
An authorized user can trigger integration tests manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
|
✅ merged via #6056, thanks again! |
Pull request was closed
…tabricks#6056) _Re-home of databricks#5988 (fork PR by @yansonggao-db) onto an in-repo branch so CI can run; reviewed and approved by @lennartkats-db_ ## Changes `databricks experimental genie ask` now sets two fields on the OneChat `/responses` request it already sends: - `source: "databricks_cli"` so the backend attributes CLI-originated Genie traffic distinctly from webapp/Slack/MCP. - `enable_viz: false` because the CLI renders in a terminal that can't display charts, so it tells the agent to skip visualization tools. Neither is user-configurable; `BuildRequest` sets both unconditionally. `EnableViz` is a `*bool` so `false` serializes past `omitempty`. ## Why Backend traffic attribution: OneChat buckets conversations by `source`, and CLI traffic currently arrives untagged. Disabling viz avoids the agent emitting chart items the terminal can't render. ## Tests `go test ./libs/genie/...` passes. `TestBuildRequest_WireFormat` pins the new fields and `TestBuildRequest_TagsSourceAndDisablesViz` asserts `source` and `enable_viz:false` are always on the wire. Co-authored-by: Yansong Gao <yansong.gao@databricks.com> Co-authored-by: Yansong Gao <yansong.gao@databricks.com> Co-authored-by: Renaud Hartert <renaud.hartert@databricks.com>
Changes
databricks experimental genie asknow sets two fields on the OneChat/responsesrequest it already sends:source: "databricks_cli"— so the backend attributes CLI-originated Genie traffic distinctly from webapp/Slack/MCP.enable_viz: false— the CLI renders in a terminal that can't display charts, so it tells the agent to skip visualization tools.Neither is user-configurable;
BuildRequestsets both unconditionally.EnableVizis a*boolsofalseserializes pastomitempty(a plainfalsewould be dropped, letting the backend default viz on).Why
Backend traffic attribution: OneChat buckets conversations by
source, and CLI traffic currently arrives untagged (bucketed as UNSPECIFIED). The matching backend enum + parsing already landed in the Databricks monorepo. Disabling viz avoids the agent emitting chart/plot items the terminal can't render.Tests
go test ./experimental/genie/...passes. UpdatedTestBuildRequest_WireFormatto pin the new fields and addedTestBuildRequest_TagsSourceAndDisablesVizassertingsourceandenable_viz:falseare always on the wire.