[PR #18560] [CLOSED] fix: correct model property paths to prevent tool deselection bug #47878

Closed
opened 2026-04-29 23:17:05 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/18560
Author: @AnthonyChen05
Created: 10/23/2025
Status: Closed

Base: mainHead: claude/fix-tool-deselection-bug-011CUQaeEP5cSj3orroEK3vN


📝 Commits (1)

  • 49ebae9 fix: correct model property paths to prevent tool deselection bug

📊 Changes

1 file changed (+15 additions, -15 deletions)

View changed files

📝 src/lib/components/chat/Chat.svelte (+15 -15)

📄 Description

Fixed incorrect property paths in Chat.svelte that were causing tools to deselect when navigating between chats. The model object structure uses model.meta and model.params directly, not model.info.meta or model.info.params.

Changes:

  • Fixed tool selection restoration (setDefaults function)
  • Fixed default filter and feature initialization
  • Fixed vision capability checks
  • Fixed web search capability checks
  • Fixed stream response parameter access
  • Fixed usage capability checks

This ensures that when a model has default tools configured, they are properly restored when returning to a chat using that model.

🤖 Generated with Claude Code

Pull Request Checklist

Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.

Before submitting, make sure you've checked the following:

  • Target branch: Verify that the pull request targets the dev branch. Not targeting the dev branch may lead to immediate closure of the PR.
  • Description: Provide a concise description of the changes made in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: If necessary, update relevant documentation Open WebUI Docs like environment variables, the tutorials, or other documentation sources.
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
  • Testing: Perform manual tests to verify the implemented fix/feature works as intended AND does not break any other functionality. Take this as an opportunity to make screenshots of the feature/fix and include it in the PR description.
  • Agentic AI Code:: Confirm this Pull Request is not written by any AI Agent or has at least gone through additional human review and manual testing. If any AI Agent is the co-author of this PR, it may lead to immediate closure of the PR.
  • Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
  • Title Prefix: To clearly categorize this pull request, prefix the pull request title using one of the following:
    • BREAKING CHANGE: Significant changes that may affect compatibility
    • build: Changes that affect the build system or external dependencies
    • ci: Changes to our continuous integration processes or workflows
    • chore: Refactor, cleanup, or other non-functional code changes
    • docs: Documentation update or addition
    • feat: Introduces a new feature or enhancement to the codebase
    • fix: Bug fix or error correction
    • i18n: Internationalization or localization changes
    • perf: Performance improvement
    • refactor: Code restructuring for better maintainability, readability, or scalability
    • style: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc.)
    • test: Adding missing tests or correcting existing tests
    • WIP: Work in progress, a temporary label for incomplete or ongoing work

Changelog Entry

Description

  • [Concisely describe the changes made in this pull request, including any relevant motivation and impact (e.g., fixing a bug, adding a feature, or improving performance)]

Added

  • N/A

Changed

  • Updated property access paths in src/lib/components/chat/Chat.svelte from model.info.meta to model.meta
    Updated property access paths from model.info.params to model.params

Deprecated

  • N/A

Removed

  • N/A

Fixed

  • Fixed tool selection restoration in setDefaults() function (lines 271, 274)
  • Fixed default filter initialization (lines 280-281)
  • Fixed default feature initialization for image generation, web search, and code interpreter (lines 287-297)
  • Fixed vision capability check (line 1681)
  • Fixed web search capability check (line 1740)
  • Fixed stream response parameter access (line 1800)
  • Fixed usage capability check (line 1911)

Security

  • [List any new or updated security-related changes, including vulnerability fixes]

Breaking Changes

  • BREAKING CHANGE: [List any breaking changes affecting compatibility or functionality]

Additional Information

  • Testing Required
    This fix requires manual testing to verify:

Navigate to a chat with a model that has default tools configured
Navigate away from the chat
Return to the chat and verify tools are properly restored
Verify default features (image generation, web search, code interpreter) are properly restored
Verify vision and web search capabilities are correctly detected

AI Assistance Notice
⚠️ Important: This PR was developed with assistance from Claude Code (AI agent). Human review and manual testing are REQUIRED before merging, as per the contribution guidelines.

Screenshots or Videos

  • [Attach any relevant screenshots or videos demonstrating the changes]

Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.


🔄 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/open-webui/open-webui/pull/18560 **Author:** [@AnthonyChen05](https://github.com/AnthonyChen05) **Created:** 10/23/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `claude/fix-tool-deselection-bug-011CUQaeEP5cSj3orroEK3vN` --- ### 📝 Commits (1) - [`49ebae9`](https://github.com/open-webui/open-webui/commit/49ebae915794868a72566c42bedbe66250d95564) fix: correct model property paths to prevent tool deselection bug ### 📊 Changes **1 file changed** (+15 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/chat/Chat.svelte` (+15 -15) </details> ### 📄 Description Fixed incorrect property paths in Chat.svelte that were causing tools to deselect when navigating between chats. The model object structure uses `model.meta` and `model.params` directly, not `model.info.meta` or `model.info.params`. Changes: - Fixed tool selection restoration (setDefaults function) - Fixed default filter and feature initialization - Fixed vision capability checks - Fixed web search capability checks - Fixed stream response parameter access - Fixed usage capability checks This ensures that when a model has default tools configured, they are properly restored when returning to a chat using that model. 🤖 Generated with [Claude Code](https://claude.com/claude-code) # Pull Request Checklist ### Note to first-time contributors: Please open a discussion post in [Discussions](https://github.com/open-webui/open-webui/discussions) and describe your changes before submitting a pull request. **Before submitting, make sure you've checked the following:** - [ ] **Target branch:** Verify that the pull request targets the `dev` branch. Not targeting the `dev` branch may lead to immediate closure of the PR. - [ ] **Description:** Provide a concise description of the changes made in this pull request. - [ ] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [ ] **Documentation:** If necessary, update relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs) like environment variables, the tutorials, or other documentation sources. - [ ] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation? - [ ] **Testing:** Perform manual tests to verify the implemented fix/feature works as intended AND does not break any other functionality. Take this as an opportunity to make screenshots of the feature/fix and include it in the PR description. - [ ] **Agentic AI Code:**: Confirm this Pull Request is **not written by any AI Agent** or has at least gone through additional human review **and** manual testing. If any AI Agent is the co-author of this PR, it may lead to immediate closure of the PR. - [ ] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards? - [ ] **Title Prefix:** To clearly categorize this pull request, prefix the pull request title using one of the following: - **BREAKING CHANGE**: Significant changes that may affect compatibility - **build**: Changes that affect the build system or external dependencies - **ci**: Changes to our continuous integration processes or workflows - **chore**: Refactor, cleanup, or other non-functional code changes - **docs**: Documentation update or addition - **feat**: Introduces a new feature or enhancement to the codebase - **fix**: Bug fix or error correction - **i18n**: Internationalization or localization changes - **perf**: Performance improvement - **refactor**: Code restructuring for better maintainability, readability, or scalability - **style**: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc.) - **test**: Adding missing tests or correcting existing tests - **WIP**: Work in progress, a temporary label for incomplete or ongoing work # Changelog Entry ### Description - [Concisely describe the changes made in this pull request, including any relevant motivation and impact (e.g., fixing a bug, adding a feature, or improving performance)] ### Added - N/A ### Changed - Updated property access paths in src/lib/components/chat/Chat.svelte from model.info.meta to model.meta Updated property access paths from model.info.params to model.params ### Deprecated - N/A ### Removed - N/A ### Fixed - Fixed tool selection restoration in setDefaults() function (lines 271, 274) - Fixed default filter initialization (lines 280-281) - Fixed default feature initialization for image generation, web search, and code interpreter (lines 287-297) - Fixed vision capability check (line 1681) - Fixed web search capability check (line 1740) - Fixed stream response parameter access (line 1800) - Fixed usage capability check (line 1911) ### Security - [List any new or updated security-related changes, including vulnerability fixes] ### Breaking Changes - **BREAKING CHANGE**: [List any breaking changes affecting compatibility or functionality] --- ### Additional Information - Testing Required This fix requires manual testing to verify: Navigate to a chat with a model that has default tools configured Navigate away from the chat Return to the chat and verify tools are properly restored Verify default features (image generation, web search, code interpreter) are properly restored Verify vision and web search capabilities are correctly detected AI Assistance Notice ⚠️ Important: This PR was developed with assistance from Claude Code (AI agent). Human review and manual testing are REQUIRED before merging, as per the contribution guidelines. ### Screenshots or Videos - [Attach any relevant screenshots or videos demonstrating the changes] ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <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-29 23:17:05 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#47878