Skip to content

Use haiku for databricks#6943

Merged
DOsinga merged 2 commits intomainfrom
use-claude-haiku-4-5-for-databricks
Feb 4, 2026
Merged

Use haiku for databricks#6943
DOsinga merged 2 commits intomainfrom
use-claude-haiku-4-5-for-databricks

Conversation

@DOsinga
Copy link
Collaborator

@DOsinga DOsinga commented Feb 4, 2026

Summary

We're seeing compaction being super slow internally. Switching to anthropic models that we use for the main model mostly would be a solution

@DOsinga DOsinga requested review from Copilot and katzdave and removed request for Copilot February 4, 2026 12:09
Copilot AI review requested due to automatic review settings February 4, 2026 14:44
@tlongwell-block
Copy link
Collaborator

/goose

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR switches the Databricks fast model from "gemini-2-5-flash" to "databricks-claude-haiku-4-5" to address slow compaction performance. The change aligns with using Anthropic models that are used for main operations.

Changes:

  • Updated default fast model constant to use Claude Haiku 4.5 instead of Gemini 2.5 Flash
  • Added environment variable override capability to the compaction test script for easier testing

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
crates/goose/src/providers/databricks.rs Changed DATABRICKS_DEFAULT_FAST_MODEL from "gemini-2-5-flash" to "databricks-claude-haiku-4-5"
scripts/test_compaction.sh Added COMPACTION_PROVIDER and COMPACTION_MODEL environment variables to override provider/model settings during testing

pub const DATABRICKS_DEFAULT_MODEL: &str = "databricks-claude-sonnet-4";
const DATABRICKS_DEFAULT_FAST_MODEL: &str = "gemini-2-5-flash";
const DATABRICKS_DEFAULT_FAST_MODEL: &str = "databricks-claude-haiku-4-5";
pub const DATABRICKS_KNOWN_MODELS: &[&str] = &[
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new fast model "databricks-claude-haiku-4-5" should be added to DATABRICKS_KNOWN_MODELS. This list is used for provider metadata to help users discover available models, and the default fast model should be included.

Suggested change
pub const DATABRICKS_KNOWN_MODELS: &[&str] = &[
pub const DATABRICKS_KNOWN_MODELS: &[&str] = &[
"databricks-claude-haiku-4-5",

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

PR #6943 Review: Use haiku for databricks

Summary: This PR changes the Databricks provider's default fast model from gemini-2-5-flash to databricks-claude-haiku-4-5 to address slow compaction performance. The change is minimal and correctly scoped. The test script improvements for environment variable overrides are a nice addition.

Analysis

The fast model is used internally for compaction and session naming via complete_fast() - it's not user-facing. The change is valid because:

  1. Model naming is correct: The is_claude_model() function in formats/databricks.rs uses .contains("claude"), so databricks-claude-haiku-4-5 will properly be recognized as a Claude model and receive appropriate cache control handling.

  2. Not being in KNOWN_MODELS is fine: I initially considered flagging this, but DATABRICKS_KNOWN_MODELS is only used for UI suggestions during model configuration. The fast model is an internal default and the previous value gemini-2-5-flash wasn't in KNOWN_MODELS either.

  3. Test script changes are useful: Adding COMPACTION_PROVIDER and COMPACTION_MODEL environment variable overrides allows easier testing of compaction with different provider/model combinations.

✅ Highlights

  • Clean, minimal change that addresses the stated problem
  • Test script improvements add useful debugging capability without disrupting existing behavior
  • The conditional logic for env var overrides is straightforward and well-documented

🟢 Suggestions

  1. Optional: Add to KNOWN_MODELS - Consider adding databricks-claude-haiku-4-5 to DATABRICKS_KNOWN_MODELS for completeness. This isn't required for functionality, but would document that this is a valid model name users could select:
const DATABRICKS_KNOWN_MODELS: &[&str] = &[
    "databricks-claude-sonnet-4",
    "databricks-claude-haiku-4-5",  // Add this
    "databricks-meta-llama-3-3-70b-instruct",
    // ...
];

This PR looks good to merge.


Review generated by goose

@DOsinga DOsinga added this pull request to the merge queue Feb 4, 2026
Merged via the queue into main with commit 6ae72a6 Feb 4, 2026
25 of 27 checks passed
@DOsinga DOsinga deleted the use-claude-haiku-4-5-for-databricks branch February 4, 2026 17:27
stebbins pushed a commit to stebbins/goose that referenced this pull request Feb 4, 2026
Co-authored-by: Douwe Osinga <douwe@squareup.com>
Signed-off-by: Harrison <hcstebbins@gmail.com>
kuccello pushed a commit to kuccello/goose that referenced this pull request Feb 7, 2026
Co-authored-by: Douwe Osinga <douwe@squareup.com>
Tyler-Hardin pushed a commit to Tyler-Hardin/goose that referenced this pull request Feb 11, 2026
Co-authored-by: Douwe Osinga <douwe@squareup.com>
Tyler-Hardin pushed a commit to Tyler-Hardin/goose that referenced this pull request Feb 11, 2026
Co-authored-by: Douwe Osinga <douwe@squareup.com>
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.

3 participants