alfin06/swegent-issues-filtered huggingface dataset:
Autogen MCP : Error: unhandled errors in a TaskGroup (1 sub-exception) using Autogen and gpt-4o.

### What happened?

**Describe the bug**
I faced a bug when I tried to use Autogen with the Shopify MCP server. The model calls the tool correctly, including the correct query.  It is working fine when tried using langchain and MCP Inspector. 

**To Reproduce**

import asyncio

from autogen_agentchat.agents import AssistantAgent
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_ext.tools.mcp import StdioServerParams, mcp_server_tools
from autogen_agentchat.ui import Console
import os 
from dotenv import load_dotenv
load_dotenv()

async def main() -> None:
    # Get the fetch tool from mcp-server-fetch.
    shopify_mcp_server = StdioServerParams(command="node", args=["shopify-mcp-server/build/index.js"],env={'SHOPIFY_ACCESS_TOKEN':#shopify_access_token ,'MYSHOPIFY_DOMAIN':#shopify_domain})
    tools = await mcp_server_tools(shopify_mcp_server)

    # Create an agent that can use the fetch tool.
    model_client = OpenAIChatCompletionClient(model="gpt-4o",api_key=#api_key)
    agent = AssistantAgent(name="shopify_assistant", model_client=model_client, tools=tools, reflect_on_tool_use=True)  # type: ignore
    # Let the agent fetch the content of a URL and summarize it.
    await Console (agent.run_stream(task="show order #1001"))
    # print(result.messages[-1].content)

asyncio.run(main())

**Current Behavior**
When I asked to show an order of order number 100 it is showing this output:
Shopify MCP Server running on stdio
---------- user ----------
show order 100
---------- shopify_assistant ----------
[FunctionCall(id='call_2gEpQguofxe0Z5cLkLYNg3yk', arguments='{"query":"name:100","first":1}', name='get-orders')]
Shopify MCP Server running on stdio
---------- shopify_assistant ----------
[FunctionExecutionResult(content='Error: unhandled errors in a TaskGroup (1 sub-exception)', name='get-orders', call_id='call_2gEpQguofxe0Z5cLkLYNg3yk', is_error=True)]
---------- shopify_assistant ----------
It seems there was an error processing your request to fetch order 100. Could you please verify the order number or check if there are any connectivity issues? Let me know if you would like me to try again or assist further.

When I give the orderId instead or order_number the model is fetching the correct result. But for most of the queries the same issue is happening.



### Which packages was the bug in?

Python Extensions (autogen-ext)

### AutoGen library version.

Python dev (main branch)

### Other library version.

_No response_

### Model used

gpt-4o

### Model provider

OpenAI

### Other model provider

_No response_

### Python version

None

### .NET version

None

### Operating system

Windows

Labels: needs-triage
State: closed
/chat save command saves empty conversations with only system context

### What happened?

### Summary
When using gemini-cli, the `/chat save` command saves conversation checkpoints even when there are no actual user messages, only the initial system context messages. This creates empty or meaningless saved conversations that waste storage and clutter the checkpoint list.

### Steps to Reproduce
1. Open gemini-cli in any terminal
2. Start a new chat session (this automatically adds initial system context)
3. Run the save command without any user interaction:
   ╭────────────────────────╮
    │  > /chat save default                               
   ╰────────────────────────╯

Observed: The command successfully saves a "conversation" with tag "default" even though no actual user conversation exists.

4. List saved conversations:
   ╭────────────────────────╮
    │  > /chat list                                            
   ╰────────────────────────╯

Observed: The "default" checkpoint appears in the list, but when loaded, it contains only system context messages (environment info, directory structure, etc.) and no actual user conversation.

### Impact
- Users can accidentally save empty conversations that serve no purpose
- Storage is wasted on meaningless checkpoints
- The checkpoint list becomes cluttered with non-functional saves
- When users try to resume these "conversations," they find no actual content to work with
- This creates confusion about what constitutes a valid conversation to save



### What did you expect to happen?

The `/chat save` command should only save conversations that contain actual user messages beyond the initial system context. If only system context messages exist, the command should return "No conversation found to save" instead of creating an empty checkpoint.


### Client information

<details>

```console
CLI Version: 0.1.20
Git Commit: 214800cf
Operating System: win32
Sandbox: no sandbox
Model Version: gemini-2.5-pro
Terminals: Any terminal
Auth Method: OAuth
```

</details>

### Login information

OAuth (but I think it affects all authentication methods)

### Anything else we need to know?

The issue occurs because the save logic checks `history.length > 0` instead of checking for actual user content. The initial system context always consists of exactly 2 messages (user context + model acknowledgment), so checking `history.length > 2` would ensure only conversations with real user interaction are saved.

The resume command already has logic to filter out these system messages for display, but the save command doesn't apply similar filtering before saving.

Labels: status/need-triage
State: closed
[BUG] Tools loaded by passing a file path only load the last defined tool in file

### Checks

- [x] I have updated to the lastest minor and patch version of Strands
- [x] I have checked the documentation and this is not expected behavior
- [x] I have searched [./issues](./issues?q=) and there are no duplicates of my issue

### Strands Version

1.3.0

### Python Version

3.11.13

### Operating System

Linux

### Installation Method

pip

### Steps to Reproduce

Create a file called multiple_tools.py with multiple unique @tool definitions

Pass tool as file path to Agent:

```
agent = Agent(
    tools=['/tools/multiple_tools.py']
)
```

### Expected Behavior

The agent should have access to all the tools defined in multiple_tools.py

### Actual Behavior

The agent only has access to the last defined @tool in the file - the rest are ignored.

### Additional Context

If you create a file called multiple_tools.py with multiple @tool definitions and use load_tools_from_directory=True

`agent = Agent(load_tools_from_directory=True)`

All tools defined by @tool are loaded into the agent.

If you instead pass the file path only the last tool is loaded.



### Possible Solution

N/A

### Related Issues

https://github.com/strands-agents/sdk-python/pull/508

Labels: bug, ready for contribution
State: closed
[Request] Support sambanova.ai Provider

### 🥰 Feature Description

Add sambanova.ai Provider in AI Provider

### 🧐 Proposed Solution

It is similar to Groq. It offers fast LLM models and was the first to support the DS-R1-670B model. Its API is compatible with OpenAI's standards.

### 📝 Additional Information

_No response_

Labels: released
State: closed
[Bug] 设置了OPENAI_MODEL_LIST和ENABLED_OLLAMA为0但是第一次进入时还是会出现gpt-4o-mini这个模型

### 📦 部署环境

Docker

### 📌 软件版本

v1.53.12

### 💻 系统环境

Ubuntu

### 🌐 浏览器

Chrome

### 🐛 问题描述

   -e OPENAI_MODEL_LIST=-all,+Qwen/Qwen2.5-72B-Instruct-128K,+deepseek-ai \
   -e DEFAULT_AGENT_CONFIG="model=Qwen/Qwen2.5-72B-Instruct-128K;provider=openai;" \
   -e ENABLED_OLLAMA=0 \


需要刷新后才能显示默认模型

![Image](https://github.com/user-attachments/assets/b0208217-f1c6-4064-9650-c9b2686bd3ca)


### 📷 复现步骤

_No response_

### 🚦 期望结果

_No response_

### 📝 补充信息

_No response_

Labels: released, provider:ollama
State: closed
[Bug] 不支持豆包吗

### 📦 部署环境

Docker

### 📌 软件版本

1.53

### 💻 系统环境

Ubuntu

### 🌐 浏览器

Chrome

### 🐛 问题描述

不支持豆包或火山中的deepseek了么

### 📷 复现步骤

_No response_

### 🚦 期望结果

_No response_

### 📝 补充信息

_No response_

Labels: released
State: closed
Model client streaming from the selector of SelectorGroupChat

### Feature Request

We can enable streaming for SelectoGroupChat's built-in selector by introducing an option in SelectorGroupChat, e.g., model_client_stream so the model client will be used in streaming model. It will use create_stream rather than create.

As the next step, we can enable streaming of orchestration events through run_stream so the streaming output will be visible from consumer of run_stream. Issue here: #6161


--- Below is the original bug report ---

### What happened?

**Describe the bug**
Some llm models only support stream  = True. The assistant agent supports this very well by setting model_client_stream = True. But the OpenAIChatCompletionClient does not allow to pass stream = True to it. Therefore, it's not very possible to use llm models which only supports stream = True.

**To Reproduce**

```
    raise self._make_status_error_from_response(err.response) from None
openai.BadRequestError: Error code: 400 - {'error': {'code': 'invalid_parameter_error', 'param': None, 'message': 'This model only support stream mode, please enable the stream parameter to access the model. ', 'type': 'invalid_request_error'}, 'id': 
```

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.


### Which packages was the bug in?

Python AgentChat (autogen-agentchat>=0.4.0)

### AutoGen library version.

Python dev (main branch)

### Other library version.

_No response_

### Model used

_No response_

### Model provider

None

### Other model provider

_No response_

### Python version

None

### .NET version

None

### Operating system

None

Labels: help wanted
State: closed
Update of @langchain/mistralai necessary for using Mistral API in Autogen Studio

### What happened?

**Describe the bug**  
When using Autogen Studio with the Mistral API, the generated request payload includes an extra field ("name") inside the user object. The Mistral API only accepts "role" and "content" for user messages, so including the "name" field causes a HTTP 422 error ("Extra inputs are not permitted"). This issue causes all API calls to fail unless the extra field is removed.

**To Reproduce**  
1. Configure Autogen Studio with the following provider settings:  
   ```json
   {
     "provider": "autogen_ext.models.openai.OpenAIChatCompletionClient",
     "component_type": "model",
     "version": 1,
     "component_version": 1,
     "description": "Chat completion client for OpenAI hosted models.",
     "label": "OpenAIChatCompletionClient",
     "config": {
       "model": "mistral-small-latest",
       "model_info": {
         "family": "mistral",
         "model_name": "mistral-small-latest",
         "vision": false,
         "function_calling": true,
         "json_output": false
       },
       "api_key": "YOUR_API_KEY",
       "api_type": "mistral",
       "base_url": "https://api.mistral.ai/v1/"
     }
   }
   ```
2. Trigger a chat completion request. The generated payload contains an object similar to:  
   ```json
   {
     "role": "user",
     "content": "Your prompt here",
     "name": "user"
   }
   ```
3. The Mistral API responds with a HTTP 422 error:  
   ```
   {
     "detail": [
       {
         "type": "extra_forbidden",
         "loc": ["body", "messages", 0, "user", "name"],
         "msg": "Extra inputs are not permitted",
         "input": "user"
       }
     ]
   }
   ```

**Expected behavior**  
The API request payload should only include the "role" and "content" keys for the user object. With the correct payload structure, the Mistral API call should succeed without returning a 422 error.

**Additional context**  
This issue has been addressed in the underlying library @langchain/mistralai, which in version 0.0.19 removes the extra "name" field from the request. [Updating to version 0.0.19 resolves the problem.](https://github.com/langchain-ai/langchainjs/issues/5144) 
Since Autogen Studio currently uses an older version, please update the dependency to @langchain/mistralai version 0.0.19 (or later) to ensure compatibility with the stricter validation rules of the Mistral API.

Feedback or further questions are welcome.

### Which packages was the bug in?

AutoGen Studio (autogensudio)

### AutoGen library version.

Python dev (main branch)

### Other library version.

_No response_

### Model used

All mistral models

### Model provider

Mistral AI

### Other model provider

_No response_

### Python version

None

### .NET version

None

### Operating system

None

Labels: needs-triage
State: closed
Adding a `output_task_messages` to `run_stream` methods to avoid messages in `task` are included.

### Confirmation

- [x] I confirm that I am a maintainer and so can use this template. If I am not, I understand this issue will be closed and I will be asked to use a different template.

### Issue body

Help `SocietyOfMindAgent` to avoid fragile counting-based skipping of task messages. Also, it makes it easier to nest agent teams within teams. 

Labels: help wanted, proj-agentchat
State: closed
Support a wider range of termination conditions in AGS

AGS UI currently supports text message term and max message term.
In reality, AgentChat supports much more. 
This PR is to track work on ensuring parity across agentchat and ags UI

cc @ekzhu 

Labels: proj-studio
State: closed
[Request] 支持火山引擎 API

### 🥰 Feature Description

火山引擎现在有满血版的 DeepSeek R1 可以部署，且可以免费使用

https://mp.weixin.qq.com/s/0BItMZq7ZQwXpxYmfljvCA

![Image](https://github.com/user-attachments/assets/1e11231a-2154-45f9-adb5-fbb98a96b952)

### 🧐 Proposed Solution

https://www.volcengine.com/docs/82379/
https://www.volcengine.com/docs/82379/1099522

### 📝 Additional Information

_No response_

Labels: released
State: closed
run Autogen and GraphRAG sample, report error: ModuleNotFoundError: No module named 'graphrag.config.config_file_loader'

### What happened?

**Describe the bug**
I want to run the sample followed: https://github.com/microsoft/autogen/blob/main/python/samples/agentchat_graphrag/README.md,
after completed the setup,
when run the command: python app.py
encounter the error:
```
(autogen) C:\Users\xxx\autogen\autogen\python\samples\agentchat_graphrag>python app.py
Traceback (most recent call last):
  File "C:\Users\xxx\autogen\autogen\python\samples\agentchat_graphrag\app.py", line 10, in <module>
    from autogen_ext.tools.graphrag import (
  File "C:\Users\xxx\AppData\Local\miniconda3\envs\autogen\Lib\site-packages\autogen_ext\tools\graphrag\__init__.py", line 9, in <module>
    from ._global_search import GlobalSearchTool, GlobalSearchToolArgs, GlobalSearchToolReturn
  File "C:\Users\xxx\AppData\Local\miniconda3\envs\autogen\Lib\site-packages\autogen_ext\tools\graphrag\_global_search.py", line 8, in <module>
    from graphrag.config.config_file_loader import load_config_from_file
ModuleNotFoundError: No module named 'graphrag.config.config_file_loader'
```

**To Reproduce**
1. conda create -n test python=3.12 -y
2. conda activate test
3. in dir autogen\python\samples\agentchat_graphrag, pip install -r requirements.txt
4. run the setup steps
5. python app.py

autogen\python\samples\agentchat_graphrag>conda list graphrag
# packages in environment at C:\Users\xxx\AppData\Local\miniconda3\envs\test:
#
# Name                    Version                   Build  Channel
graphrag                  2.1.0                    pypi_0    pypi

**Expected behavior**
A clear and concise description of what you expected to happen.
![Image](https://github.com/user-attachments/assets/ff070a54-e200-4d5f-8677-5b548e2656c1)

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.


### Which packages was the bug in?

Python AgentChat (autogen-agentchat>=0.4.0), Python Extensions (autogen-ext)

### AutoGen library version.

Python 0.4.9

### Other library version.

autogen-ext  0.4.9.3;  graphrag  2.1.0

### Model used

gpt-4o-2024-08-06

### Model provider

Azure OpenAI

### Other model provider

_No response_

### Python version

3.12

### .NET version

None

### Operating system

Windows

Labels: help wanted, proj-extensions
State: closed
AutoGen Studio is **broken** due to a missing message class (LLMCallEventMessage) (v0.5+)

### What happened?

**Describe the bug**
AutoGen Studio currently fails to run any agent that emits `LLMCallEventMessage`, because that class is abstract and not implemented.

This causes the following runtime error:
`TypeError: Can’t instantiate abstract class LLMCallEventMessage with abstract methods to_model_message, to_model_text, to_text`

This was reported by a user on Discord:

> சravanaன் — 6:40 PM  
> “i updated agentchat and agentcore and tried running the config from agentstudio and it is now not running the agent and is throwing error ...”


**To Reproduce**
Steps:
1. Use AgentStudio (v0.4.x from PyPI or v0.5.x from Githun repo too)
2. Add an agent that emits `LLMCallEventMessage` - `Any agent`
3. Run
→ Error will occur immediately, breaking the execution.


**Expected behavior**
Agent should run without error. `LLMCallEventMessage` is meant for logging, not model input, so it should be safely handled.


**Fix**
Fix is proposed in PR: https://github.com/microsoft/autogen/pull/6204  
This defines the class with `to_model_message()` marked as `NotImplementedError`.

**Additional context**

- This issue blocks AgentStudio for many use cases using latest AgentCore.
- Quick merge & release would help users avoid this broken state.

**Screen shot**
<img width="867" alt="Image" src="https://github.com/user-attachments/assets/db6762e8-d10b-40a2-b57f-a4f6ec67c51c" />

### Which packages was the bug in?

AutoGen Studio (autogensudio)

### AutoGen library version.

Python dev (main branch)

### Other library version.

_No response_

### Model used

_No response_

### Model provider

None

### Other model provider

_No response_

### Python version

None

### .NET version

None

### Operating system

None

Labels: needs-triage
State: closed
Self-debugging in `CodeExecutionAgent`

### Confirmation

- [x] I confirm that I am a maintainer and so can use this template. If I am not, I understand this issue will be closed and I will be asked to use a different template.

### Issue body

Follow up to #6098, add auto-debugging loop to `CodeExecutionAgent` so it automatically tries to regenerate code when there is error. 

Labels: code-execution, proj-agentchat
State: closed
Update GraphRAG version

### Confirmation

- [x] I confirm that I am a maintainer and so can use this template. If I am not, I understand this issue will be closed and I will be asked to use a different template.

### Issue body

GraphRAG made some API changes since 1.2.0. We need to catch up with the latest version. 

Also update the autogen version in the sample: https://github.com/microsoft/autogen/blob/main/python/samples/agentchat_graphrag/requirements.txt

Related: #6201

Labels: help wanted, proj-extensions
State: closed
[Bug] 关闭历史消息自动总结后仍然包含已总结的内容

### 📦 部署环境

Official Preview, Vercel

### 📦 部署模式

服务端模式(lobe-chat-database 镜像)

### 📌 软件版本

latest

### 💻 系统环境

Windows

### 🌐 浏览器

Chrome

### 🐛 问题描述

将“开启历史消息自动总结”关闭后，再进行对话，会发现请求中仍然包含总结内容，放在首条 system 消息中。

token 计数器也仍有计数。

![Image](https://github.com/user-attachments/assets/36a52644-1057-4c3e-bef5-b3816cf9da57)

### 📷 复现步骤

_No response_

### 🚦 期望结果

_No response_

### 📝 补充信息

_No response_

Labels: Inactive, released
State: closed
Error During Writing more than one file

### What happened?

I ask the Gemini cli with VS code integration to add serializer, views and urls in Django RestFramework and this is error is gave me which is something never happened in simple gemini cli:
✕ [API Error: [{
    "error": {
      "code": 400,
      "message": "Please ensure that the number of function response parts is equal to the number of function call parts of the function call turn.",
      "errors": [
        {
          "message": "Please ensure that the number of function response parts is equal to the number of function call parts of the function call turn.",
          "domain": "global",
          "reason": "badRequest"
        }
      ],
      "status": "INVALID_ARGUMENT"
    }
  }
  ]]


### What did you expect to happen?

It is suppose to simply write to 3 file which it would have if the error didn't occur.

### Client information


* **CLI Version:** 0.1.21
* **Git Commit:** 055fe46d
* **Operating System:** linux v22.14.0
* **Sandbox Environment:** no sandbox
* **Model Version:** gemini-2.5-pro
* **Memory Usage:** 190.3 MB


### Login information

_No response_

### Anything else we need to know?

_No response_

Labels: status/need-triage
State: closed
[Bug] 最新版本系统提示词丢失

### 📦 部署环境

Docker

### 📦 部署模式

服务端模式(lobe-chat-database 镜像)

### 📌 软件版本

1.58.0

### 💻 系统环境

Android、Mac

### 🌐 浏览器

Chrome

### 🐛 问题描述

更新到 1.58.0 版本后，所有 agent 的 system prompt 都丢失了
切换模型并调整温度等参数后，再次 进入 agent 配置，模型会重置为默认模型，参数也会被重置为默认参数

在 Android PWA 和 Mac PWA 上都有这个问题

### 📷 复现步骤
录屏
https://github.com/user-attachments/assets/d3615968-ae94-42f3-8fa4-4390e0266a8f


_No response_

### 🚦 期望结果

_No response_

### 📝 补充信息

_No response_

Labels: released
State: closed
Github MCP tools Doesn't work for write operations with Autogen

### What happened?

## Issue: MCP Server Not Working with Autogen

### Description:
I have been trying to use the MCP server with autogen. I have setup this [project](https://github.com/richard-gyiko/autogen-ext-mcp/tree/main) and also tried using the latest autogen [release](https://microsoft.github.io/autogen/stable/reference/python/autogen_ext.tools.mcp.html) for using the tools in the Github server with autogen

But it seems that the server is not working correctly when attempting to use it with autogen only for write operations. It seems to work perfectly fine for the tools performing read operations like (list_issues, get_file_content), but throws an error for tools like (push_tool, create_repository, fork_repository).

### Error
[FunctionExecutionResult(content='Error: unhandled errors in a TaskGroup (1 sub-exception)', call_id='call_m9AeqiLyBeaCtLdRH4X0OExg')]
---------- mcp_tools_agent ----------
Error: unhandled errors in a TaskGroup (1 sub-exception)

The error message I receive is frequent and repeats the same error each time. I have verified that the configuration is set correctly and my Github token has all the required permissions. 

### Configuration:
github_mcp_server = StdioServerParams(
    command=npx_command,
    args=[
        "-y",
        "@modelcontextprotocol/server-github",
        "--token=***********",
        "--debug"
    ],
)

I have also given the github token in the .env file as well




### Which packages was the bug in?

Python AgentChat (autogen-agentchat>=0.4.0)

### AutoGen library version.

Python dev (main branch)

### Other library version.

_No response_

### Model used

gpt-4o-mini

### Model provider

OpenAI

### Other model provider

_No response_

### Python version

3.11

### .NET version

None

### Operating system

Ubuntu

Labels: needs-triage
State: closed