[PR #14096] app/ui: fix browser tools not registering for gptoss models with custom names #14509

Open
opened 2026-04-13 00:56:16 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/14096
Author: @larryk78
Created: 2/5/2026
Status: 🔄 Open

Base: mainHead: fix/browser-tools-model-family


📝 Commits (1)

  • 950d349 app/ui: fix browser tools not registering for gptoss models with custom names

📊 Changes

6 files changed (+178 additions, -15 deletions)

View changed files

📝 app/ui/app/src/api.ts (+25 -5)
📝 app/ui/app/src/components/ChatForm.tsx (+1 -5)
📝 app/ui/ui.go (+5 -3)
📝 app/ui/ui_test.go (+121 -0)
📝 server/images.go (+4 -2)
📝 server/images_test.go (+22 -0)

📄 Description

Summary

Fixes #14095

This PR fixes web search/browser tools not working for gptoss models with custom names. The bug had two locations:

Backend fix (server/images.go)

  • Added isGptoss check to the tools capability detection in Capabilities()
  • Previously, the thinking capability check correctly detected gptoss models by family, but tools capability didn't
  • Now both tool and thinking capabilities are properly detected for gptoss models regardless of model name

Backend fix (app/ui/ui.go)

  • Changed supportsBrowserTools() to check the model's architecture family instead of the model name string
  • Now uses details.Details.Family from the ShowResponse to determine browser tools support

Frontend fix (app/ui/app/src/api.ts, ChatForm.tsx)

  • Added supportsWebSearch() method to Model class that checks model families
  • Preserved families array when mapping models from ollama.list()
  • Fixed model name handling to keep :latest suffix for proper settings matching

Problem

  1. Capabilities() in server/images.go checked isGptoss for thinking capability but not for tools capability, causing "does not support tools" errors
  2. supportsBrowserTools() in app/ui/ui.go was checking if the model name starts with "gpt-oss", but models with gptoss architecture can have any name
  3. Frontend was also checking model name instead of architecture family for the web search globe icon

Solution

  • Added isGptoss to the tools capability check in Capabilities(), matching how thinking capability works
  • Changed supportsBrowserTools() to accept the model family string and check for exact matches of "gptoss" or "gpt-oss"
  • Added supportsWebSearch() method to frontend Model class that checks families array

Test plan

  • Added unit tests for supportsBrowserTools() covering various model families
  • Added unit tests for supportsWebSearchTools() for completeness
  • Verified web search works with official gpt-oss:120b-cloud model
  • Verified web search works with custom gptoss model Raiff1982/codette-ultimate-v2:latest
  • All existing tests pass

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/14096 **Author:** [@larryk78](https://github.com/larryk78) **Created:** 2/5/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/browser-tools-model-family` --- ### 📝 Commits (1) - [`950d349`](https://github.com/ollama/ollama/commit/950d34969cceb6c15aee2adf73b189ff446b6d1e) app/ui: fix browser tools not registering for gptoss models with custom names ### 📊 Changes **6 files changed** (+178 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `app/ui/app/src/api.ts` (+25 -5) 📝 `app/ui/app/src/components/ChatForm.tsx` (+1 -5) 📝 `app/ui/ui.go` (+5 -3) 📝 `app/ui/ui_test.go` (+121 -0) 📝 `server/images.go` (+4 -2) 📝 `server/images_test.go` (+22 -0) </details> ### 📄 Description ## Summary Fixes #14095 This PR fixes web search/browser tools not working for gptoss models with custom names. The bug had two locations: ### Backend fix (server/images.go) - Added `isGptoss` check to the tools capability detection in `Capabilities()` - Previously, the thinking capability check correctly detected gptoss models by family, but tools capability didn't - Now both tool and thinking capabilities are properly detected for gptoss models regardless of model name ### Backend fix (app/ui/ui.go) - Changed `supportsBrowserTools()` to check the model's architecture family instead of the model name string - Now uses `details.Details.Family` from the `ShowResponse` to determine browser tools support ### Frontend fix (app/ui/app/src/api.ts, ChatForm.tsx) - Added `supportsWebSearch()` method to Model class that checks model families - Preserved families array when mapping models from ollama.list() - Fixed model name handling to keep `:latest` suffix for proper settings matching ## Problem 1. `Capabilities()` in `server/images.go` checked `isGptoss` for thinking capability but not for tools capability, causing "does not support tools" errors 2. `supportsBrowserTools()` in `app/ui/ui.go` was checking if the model name starts with "gpt-oss", but models with `gptoss` architecture can have any name 3. Frontend was also checking model name instead of architecture family for the web search globe icon ## Solution - Added `isGptoss` to the tools capability check in `Capabilities()`, matching how thinking capability works - Changed `supportsBrowserTools()` to accept the model family string and check for exact matches of "gptoss" or "gpt-oss" - Added `supportsWebSearch()` method to frontend Model class that checks families array ## Test plan - [x] Added unit tests for `supportsBrowserTools()` covering various model families - [x] Added unit tests for `supportsWebSearchTools()` for completeness - [x] Verified web search works with official `gpt-oss:120b-cloud` model - [x] Verified web search works with custom gptoss model `Raiff1982/codette-ultimate-v2:latest` - [x] All existing tests pass 🤖 Generated with [Claude Code](https://claude.ai/code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 00:56:16 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#14509