Skip to content

Tag genie ask requests with databricks_cli source and disable viz#5988

Open
yansonggao-db wants to merge 1 commit into
databricks:mainfrom
yansonggao-db:genie-source-and-viz
Open

Tag genie ask requests with databricks_cli source and disable viz#5988
yansonggao-db wants to merge 1 commit into
databricks:mainfrom
yansonggao-db:genie-source-and-viz

Conversation

@yansonggao-db

Copy link
Copy Markdown

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 — 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 (a plain false would 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. Updated TestBuildRequest_WireFormat to pin the new fields and added TestBuildRequest_TagsSourceAndDisablesViz asserting source and enable_viz:false are always on the wire.

@yansonggao-db

Copy link
Copy Markdown
Author

@lennartkats-db this is the CLI side of the Genie-One-in-CLI work — databricks experimental genie ask now sends source: "databricks_cli" + enable_viz: false on the OneChat /responses request (the matching backend enum + parsing already landed in universe). Built + go test ./experimental/genie/... passes locally; lint is green here. The red checks are just the fork-PR OIDC/JFrog auth limitation (test/validate-generated jobs can't get repo secrets from a fork) — they'll need a trusted CI run. Could you take a look / trigger CI, or point me to the right maintainer? Thanks!

Comment thread .nextchanges/cli/genie-ask-source-and-viz.md Outdated
Comment thread libs/genie/client.go
@yansonggao-db
yansonggao-db force-pushed the genie-source-and-viz branch from ab82edf to f64d9e2 Compare July 21, 2026 15:54
`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.
@yansonggao-db
yansonggao-db force-pushed the genie-source-and-viz branch from f64d9e2 to 72a1f44 Compare July 21, 2026 22:15
@github-actions

Copy link
Copy Markdown
Contributor

An authorized user can trigger integration tests manually by following the instructions below:

Trigger:
go/deco-tests-run/cli

Inputs:

  • PR number: 5988
  • Commit SHA: 72a1f44e958980e60f98cb915d9fe105cf8fb37b

Checks will be approved automatically on success.

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.

2 participants