Skip to content

Switch tetrate tool filtering back to supports_computer_use#7024

Merged
katzdave merged 3 commits intomainfrom
dkatz/tetrate-fix
Feb 6, 2026
Merged

Switch tetrate tool filtering back to supports_computer_use#7024
katzdave merged 3 commits intomainfrom
dkatz/tetrate-fix

Conversation

@katzdave
Copy link
Collaborator

@katzdave katzdave commented Feb 6, 2026

We swapped this in: #6808 but I'm not seeing the new field at all, leading to all models being filtered. supports_computer_use still seems like the best proxy from what is provided.

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 reverts part of the changes from PR #6808, which had switched the Tetrate provider from checking supports_computer_use to checking supported_parameters for determining tool support. The author indicates that the supported_parameters field isn't appearing in API responses, so this PR implements a more permissive filtering approach.

Changes:

  • Replaces explicit check for supported_parameters array containing "tools" with a more concise logic using is_some_and
  • Changes behavior to include models when supported_parameters field is missing (fallback behavior)
  • Introduces confusingly-named dominated variable to track whether models lack tool support

Comment on lines +300 to 313
.and_then(|v| v.as_bool())
.unwrap_or(false);
if supports_computer_use {
Some(id.to_string())
} else {
tracing::debug!("Model '{}' does not support tools, skipping", id);
None
}
})
.collect();

// If no models with tool support were found, fall back to manual entry
if models.is_empty() {
tracing::warn!("No models with tool support found in Tetrate Agent Router Service API response, falling back to manual model entry");
tracing::warn!("No models found in Tetrate Agent Router Service API response, falling back to manual model entry");
return Ok(None);
}
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

The PR description states this switches back to using "supports_computer_use" but the code still checks "supported_parameters". The logic also has a confusing flow: when supported_parameters is missing, models are included (dominated=false), but the comment at line 300 suggests this is intentional. However, this differs from the OpenRouter provider which explicitly skips models missing supported_parameters (see openrouter.rs:362-367). If models without this field should be included as a fallback, the variable name "dominated" is misleading - consider renaming to something like "lacks_tool_support" for clarity.

Copilot uses AI. Check for mistakes.
Comment on lines +301 to 306
.unwrap_or(false);
if supports_computer_use {
Some(id.to_string())
} else {
tracing::debug!("Model '{}' does not support tools, skipping", id);
None
}
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

The variable name "dominated" is unclear and misleading in this context. It appears to indicate whether a model lacks tool support, but the name doesn't convey this meaning. Consider renaming to "lacks_tool_support" or "should_skip" to make the logic more readable.

Copilot uses AI. Check for mistakes.
Comment on lines +300 to 312
.and_then(|v| v.as_bool())
.unwrap_or(false);
if supports_computer_use {
Some(id.to_string())
} else {
tracing::debug!("Model '{}' does not support tools, skipping", id);
None
}
})
.collect();

// If no models with tool support were found, fall back to manual entry
if models.is_empty() {
tracing::warn!("No models with tool support found in Tetrate Agent Router Service API response, falling back to manual model entry");
tracing::warn!("No models found in Tetrate Agent Router Service API response, falling back to manual model entry");
return Ok(None);
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

The comment says "If supported_parameters is available, check for tool support" but the logic using is_some_and will include models when supported_parameters is missing. This creates a permissive fallback that differs from the OpenRouter provider (which explicitly skips models missing this field). If this is intentional to handle Tetrate API responses that don't include the field, it should be documented in a comment explaining why Tetrate differs from OpenRouter's stricter approach.

Copilot generated this review using guidance from repository custom instructions.
@katzdave katzdave added this pull request to the merge queue Feb 6, 2026
Merged via the queue into main with commit 14a9d1e Feb 6, 2026
18 checks passed
@katzdave katzdave deleted the dkatz/tetrate-fix branch February 6, 2026 15:30
katzdave added a commit that referenced this pull request Feb 6, 2026
…webtoken-10.3.0

* origin/main: (54 commits)
  Switch tetrate tool filtering back to supports_computer_use (#7024)
  feat(ui): add inline rename for chat sessions in sidebar (#6995)
  fix: handle toolnames without underscores (#7015)
  feat(claude-code): use stream-json protocol for persistent sessions (#7029)
  test(providers): add model listing to live provider suite (#7038)
  Agent added too much (#7036)
  fix(deps): bump tree-sitter to 0.26 and set sqlx default-features=false to fix RUSTSEC advisories (#7031)
  feat: add image support and improve error resilience for Codex (#7033)
  fix(providers): Azure OpenAI model listing 404 during configure (#7034)
  fix(deps): bump bat to 0.26.1 to resolve RUSTSEC-2026-0008 (#7021)
  Don't swallow Tetrate errors  (#6998)
  docs: remove hardcoded_stuff links (#7016)
  fix(ui): keep Hub chat input from overlapping SessionInsights on paste (#6719)
  Clean up css (#6944)
  docs: aws bedrock bearer token auth (#6990)
  docs: extended custom provider headers support (#7012)
  feat(cli): add type-to-search filtering to select/multiselect dialogs (#6862)
  feat(ci): add cargo-audit workflow for scanning rust vulnerabilities (#6351)
  feat: add User-Agent header to MCP HTTP requests (#6988)
  chore(deps-dev): bump webpack from 5.102.1 to 5.105.0 in /ui/desktop (#6996)
  ...

# Conflicts:
#	Cargo.lock
zanesq added a commit that referenced this pull request Feb 6, 2026
* origin/main:
  Remove build-dependencies section from Cargo.toml (#6946)
  add /rp-why skill blog post (#6997)
  fix: fix snake_case function names in code_execution instructions (#7035)
  Document max_turns settings for recipes and subagents (#7044)
  feat: update Groq declarative data with Preview Models (#7023)
  fix(codex): propagate extended PATH to codex subprocess (#6874)
  Switch tetrate tool filtering back to supports_computer_use (#7024)
  feat(ui): add inline rename for chat sessions in sidebar (#6995)
  fix: handle toolnames without underscores (#7015)
  feat(claude-code): use stream-json protocol for persistent sessions (#7029)
  test(providers): add model listing to live provider suite (#7038)
  Agent added too much (#7036)
  fix(deps): bump tree-sitter to 0.26 and set sqlx default-features=false to fix RUSTSEC advisories (#7031)
  feat: add image support and improve error resilience for Codex (#7033)
  fix(providers): Azure OpenAI model listing 404 during configure (#7034)
  fix(deps): bump bat to 0.26.1 to resolve RUSTSEC-2026-0008 (#7021)
  Don't swallow Tetrate errors  (#6998)
  docs: remove hardcoded_stuff links (#7016)

# Conflicts:
#	ui/desktop/src/components/GooseSidebar/AppSidebar.tsx
kuccello pushed a commit to kuccello/goose that referenced this pull request Feb 7, 2026
dianed-square added a commit that referenced this pull request Feb 9, 2026
* origin/main: (141 commits)
  Add global config switch to disable automatic session naming (#7052)
  docs: add blog post - 8 Things You Didn't Know About Code Mode (#7059)
  fix: ensure animated elements are visible when prefers-reduced-motion is enabled (#7047)
  Show recommended model on failture (#7040)
  feat(ui): add session content search via API (#7050)
  docs: fix img url (#7053)
  Desktop UI for deleting custom providers (#7042)
  Add blog post: How I Used RPI to Build an OpenClaw Alternative (#7051)
  Remove build-dependencies section from Cargo.toml (#6946)
  add /rp-why skill blog post (#6997)
  fix: fix snake_case function names in code_execution instructions (#7035)
  Document max_turns settings for recipes and subagents (#7044)
  feat: update Groq declarative data with Preview Models (#7023)
  fix(codex): propagate extended PATH to codex subprocess (#6874)
  Switch tetrate tool filtering back to supports_computer_use (#7024)
  feat(ui): add inline rename for chat sessions in sidebar (#6995)
  fix: handle toolnames without underscores (#7015)
  feat(claude-code): use stream-json protocol for persistent sessions (#7029)
  test(providers): add model listing to live provider suite (#7038)
  Agent added too much (#7036)
  ...
Tyler-Hardin pushed a commit to Tyler-Hardin/goose that referenced this pull request Feb 11, 2026
Tyler-Hardin pushed a commit to Tyler-Hardin/goose that referenced this pull request Feb 11, 2026
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