# Model Switch Retains Incompatible Tool Configuration

**URL:** <https://community.mindstudio.ai/t/model-switch-retains-incompatible-tool-configuration/1992>\
**Category:** Bug Reports\
**Created:** [March 19, 2026, 2:50pm UTC](https://community.mindstudio.ai/t/model-switch-retains-incompatible-tool-configuration/1992 "2026-03-19T14:50:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkermen](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.mindstudio.ai/bkermen/32/1287_2.png) [@bkermen](https://community.mindstudio.ai/u/bkermen)\
**Post date:** [March 19, 2026, 2:50pm UTC](https://community.mindstudio.ai/t/model-switch-retains-incompatible-tool-configuration/1992/1 "2026-03-19T14:50:27Z")

</div>

**Summary**  
Switching from **Gemini 3 Flash (with Google Search enabled)** to **Sonar** results in a runtime error due to an incompatible leftover `tools` configuration.

* * *

**Steps to Reproduce**

1. Add a **Generate Text** block
2. Set the model to **Gemini 3 Flash**
3. Enable the **Google Search Tool**
4. Change the model to **Sonar**
5. Run the block

* * *

**Actual Result**  
The following error is returned:

```markdown
Perplexity Error: ["At body -> tools -> 0: Input should be a dictionary or an instance of ToolSpec"]

```

* * *

**Expected Result**

- The block should run successfully with Sonar  
**OR**
- The system should automatically remove or adapt incompatible tool configurations when switching models  
**OR**
- A clear validation error should be shown before execution

* * *

**Root Cause (Hypothesis)**  
The `tools` configuration from Gemini persists after switching models, even though Sonar does not support the same tool format.

Problematic config:

```json
"modelOverride": {
  "model": "sonar",
  "config": {
    "tools": [
      "googleSearch"
    ]
  },
  "temperature": 0.95,
  "ignorePreamble": false,
  "maxResponseTokens": 32768
}

```

Sonar likely expects `tools` to be structured as a `ToolSpec` object (dictionary), not a string.

* * *

**Suggested Fixes**

- Clear or reset `config.tools` when switching models
- Add schema validation on model change
- Provide UI feedback when incompatible settings persist
- Optionally auto-transform supported tool formats across models

* * *

**Impact**

- Confusing error message for users
- Breaks workflow when switching models
- Hard to diagnose without inspecting raw config

---

<div class="post-metadata">

**Author:** ![Alex\_MindStudio](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.mindstudio.ai/alex_mindstudio/32/27_2.png) [@Alex\_MindStudio](https://community.mindstudio.ai/u/Alex_MindStudio)\
**Post date:** [March 20, 2026, 2:23pm UTC](https://community.mindstudio.ai/t/model-switch-retains-incompatible-tool-configuration/1992/2 "2026-03-20T14:23:12Z")

</div>

Hi @bkermen,

Appreciate the detailed report.

I’ve reported the issue to our engineers and will get back to you as soon as I have an update.

---

<div class="post-metadata">

**Author:** ![Alex\_MindStudio](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.mindstudio.ai/alex_mindstudio/32/27_2.png) [@Alex\_MindStudio](https://community.mindstudio.ai/u/Alex_MindStudio)\
**Post date:** [March 31, 2026, 2:00pm UTC](https://community.mindstudio.ai/t/model-switch-retains-incompatible-tool-configuration/1992/3 "2026-03-31T14:00:59Z")

</div>

Hi @bkermen,

The issue has been fixed!

Appreciate you bringing this to our attention.

---

<div class="post-metadata">

**Author:** ![bkermen](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.mindstudio.ai/bkermen/32/1287_2.png) [@bkermen](https://community.mindstudio.ai/u/bkermen)\
**Post date:** [March 31, 2026, 2:16pm UTC](https://community.mindstudio.ai/t/model-switch-retains-incompatible-tool-configuration/1992/4 "2026-03-31T14:16:22Z")

</div>

Thanks! I recently noticed that setting the max response size (say, to 128,000) and then switching to a model with a shorter max response size caused a similar issue. However, I just tried it again now, and that seems to be fixed too! I think the fix applies more broadly to switching between LLMs, taking into account each model’s specific parameters. 🙂
