alfin06/swegent-issues-filtered huggingface dataset:
[Request] Sambanova.ai using preview.snova.ai endpoint for 671B R1 model

### 🥰 Feature Description

As I got the email from Sambanova.ai, that the `DeepSeek-R1` using the `https://preview.snova.ai/v1/chat/completions` endpoint, different from  another models.
Here is the email content:


CORE INFO: DeepSeek-R1 671B API Access Confirmation

API ENDPOINT: https://preview.snova.ai/v1/chat/completions

CURL COMMAND:
```bash
curl -H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
    "stream": true,
    "model": "DeepSeek-R1",
    "messages": [
        {
            "role": "user",
            "content": "Hello"
        }
    ]
}' \
-X POST https://preview.snova.ai/v1/chat/completions
```

LIMITATIONS:
- Rate limit: 10 requests/minute
- Daily limit: 2000 requests
- Sequence length: 4K
- Only available on [preview.snova.ai](https://preview.snova.ai/) (not [api.sambanova.ai](https://api.sambanova.ai/))


### 🧐 Proposed Solution

If request the `DeepSeek-R1`, change the endpoint to `preview.snova.ai`

### 📝 Additional Information

_No response_

Labels: released
State: closed
Support phi-4 released by msft on 2024-12-16

### Reminder

- [X] I have read the README and searched the existing issues.

### System Info

Feature request

https://techcommunity.microsoft.com/blog/aiplatformblog/introducing-phi-4-microsoft%E2%80%99s-newest-small-language-model-specializing-in-comple/4357090

### Reproduction

Feature request

### Expected behavior

_No response_

### Others

_No response_

Labels: solved
State: closed
completion_tokens return None when result.usage is None

### What happened?

**Describe the bug**
For something reason when I use _model_client.create genereted of next bug :
--- Logging error ---
Traceback (most recent call last):
  File "C:\Users\anis.abdel\AI\seraph3\utils\llm_usage.py", line 34, in emit
    self._completion_tokens += event.completion_tokens
TypeError: unsupported operand type(s) for +=: 'int' and 'NoneType'

I explored that situation and I founded the reason:
``` python 3.12  _openai_client.py Line 626

usage = RequestUsage(
            # TODO backup token counting
            prompt_tokens=result.usage.prompt_tokens if result.usage is not None else 0,
            completion_tokens=(result.usage.completion_tokens if result.usage is not None else 0),
        )

        logger.info(
            LLMCallEvent(
                messages=cast(List[Dict[str, Any]], create_params.messages),
                response=result.model_dump(),
                prompt_tokens=usage.prompt_tokens,
                completion_tokens=usage.completion_tokens,
            )
        )
```
Then completion_tokens=(result.usage.completion_tokens if result.usage is not None else 0),
return None!!!

But result.usage is None, for some reason return None but the real answer is 0.

**I tried change the line 629 for the next:**
(result.usage.completion_tokens if result.usage is not None and not type(None) else 0)

And the answer is sucessfully.


**To Reproduce**
Use OpenAI Model 4.1
Python 3.12
await self._model_client.create( ...)

**Expected behavior**
Succesfull comparative:
  completion_tokens=(result.usage.completion_tokens if result.usage is not None else 0)
When result.usage is Not None the correct return is 0.


**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 Extensions (autogen-ext)

### AutoGen library version.

Python 0.5.3

### Other library version.

_No response_

### Model used

gpt-4.1-2025-04-14

### Model provider

OpenAI

### Other model provider

_No response_

### Python version

3.12

### .NET version

None

### Operating system

Windows

Labels: help wanted, proj-extensions
State: closed
Teams with agents that contain duplicated produced_message_types result in an ValueError exception

### What happened?

**Describe the bug**
On 0.53.0 output_content_type for agents is automatically registered into the team [Code Reference](https://github.com/abhinav-aegis/autogen/blob/2d3f83b809516906e7329518a28c794dffcf42e3/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_base_group_chat.py#L72-L79).  When a team is comprised of agents that share the same output_content_type then a ValueError is raised.

**To Reproduce**
Add into a team 2 agents with the same Pydantic model as output_content_type.

```
ValueError: Message type <class 'autogen_agentchat.messages.StructuredMessage[<TestModel>]'> is already registered.
```

**Expected behavior**
Only register structured messages that have not been registered previously.

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

**Additional context**
I have added https://github.com/microsoft/autogen/pull/6354 for your consideration


### Which packages was the bug in?

Python AgentChat (autogen-agentchat>=0.4.0)

### AutoGen library version.

Python 0.5.3

### Other library version.

_No response_

### Model used

gpt-4o

### Model provider

OpenAI

### Other model provider

_No response_

### Python version

3.11

### .NET version

None

### Operating system

MacOS

Labels: needs-triage
State: closed
SelectorGroupChat needs for clarification for metadata

### What is the doc issue?

According to the SelectorGroupChat documentation:
1. https://microsoft.github.io/autogen/stable/user-guide/agentchat-user-guide/selector-group-chat.html
2. https://microsoft.github.io/autogen/stable/reference/python/autogen_agentchat.teams.html#autogen_agentchat.teams.SelectorGroupChat

It looks like the prompt for the Selector itself can rely on metadata such as: {roles}, {participants} and {history}.

**I have 2 suggestions about that:**

**1.** I suggest to add clarification about what are returned by those variables, especially to make distinction between {roles} and {participants}.
The best would be to have the value returned by those variables in the  documentation sample at https://microsoft.github.io/autogen/stable/user-guide/agentchat-user-guide/selector-group-chat.html so that we directly know how it works.

**2.** While we are aware of {roles} {participants} and {history} it's not clear whether we have only those 3 variables or if more others are available (such as for instance {current_turn}, {max_turns} and so on).

Thanks for your help

### Link to the doc page, if applicable

https://microsoft.github.io/autogen/stable/user-guide/agentchat-user-guide/selector-group-chat.html

Labels: documentation, needs-triage
State: closed
Deserialization Fails for Tool-Using AssistantAgents Due to Workbench Conflict (>=0.5.5)

### What happened?

**Describe the bug**
Starting from version *0.5.5*, tools are automatically registered into a `StaticWorkbench`.
However, this causes an error during *deserialization* due to a conflict in the current code logic.

The conflict arises here:
https://github.com/microsoft/autogen/blob/63c791d342dbbf4f5837c738fe1ce32426bc4f55/python/packages/autogen-agentchat/src/autogen_agentchat/agents/_assistant_agent.py#L729-L734

- During deserialization, both `tools` and `workbench` are restored.
- This leads to a `ValueError` due to both being present.

In this code, `tools` to `StaticWorkbench`
And at the serialize/deserialize code,

*Serialization/Deserialization Logic:*

https://github.com/microsoft/autogen/blob/63c791d342dbbf4f5837c738fe1ce32426bc4f55/python/packages/autogen-agentchat/src/autogen_agentchat/agents/_assistant_agent.py#L1339-L1391

- Both are serialized and deserialized, causing both to be populated.
- When both are set, the constructor raises an exception.

https://github.com/microsoft/autogen/blob/63c791d342dbbf4f5837c738fe1ce32426bc4f55/python/packages/autogen-agentchat/src/autogen_agentchat/agents/_assistant_agent.py#L729-L731

When tools and workbench are included both, `raise ValueError("Tools cannot be used with a workbench.") `


**To Reproduce**
When serialize Agent and de-serialize it.
```python
def test29():
    import asyncio
    from autogen_core import CancellationToken
    from autogen_agentchat.agents import AssistantAgent
    from autogen_ext.models.openai import OpenAIChatCompletionClient
    
    def test():
        return "hello world"
    
    client = OpenAIChatCompletionClient(
        model="gpt-4o",
    )
    
    async def run():
        agent = AssistantAgent(
            name="test",
            model_client=client,
            tools=[test],
        )

        serialize = agent.dump_component()
        deserialize = AssistantAgent.load_component(serialize)

    asyncio.run(run())

if __name__ == "__main__":
    test29()
```

```
    raise ValueError("Tools cannot be used with a workbench.")
ValueError: Tools cannot be used with a workbench.
```

**Expected behavior**

*How to resolve it?*
One of the following:
1. Reset self._tools after registering them into StaticWorkbench.
     - Since tools are already integrated into the workbench, there’s no need to keep both.
2. Avoid serializing self._tools.

example
```python
        if workbench is not None:
            if self._tools:
                raise ValueError("Tools cannot be used with a workbench.")
            self._workbench = workbench
        else:
            self._workbench = StaticWorkbench(self._tools)
        self_tools = []
```



### Which packages was the bug in?

Python AgentChat (autogen-agentchat>=0.4.0)

### AutoGen library version.

Python 0.5.5

### 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
Add imagen 3 to `google.image()`

### Description

AI Studio now supports image and video generation, so I hope I can generate images using `google.image` instead of vertex which is incredibly hard to set up.

### AI SDK Version

_No response_

Labels: feature, ai/provider, provider/google, provider/google-vertex
State: closed
[Bug] 火山引擎不支持bot ID对接，

### 📦 Platform

Other

### 📦 Deploymenet mode

client db (lobe-chat image)

### 📌 Version

1.62.10

### 💻 Operating System

Other Linux

### 🌐 Browser

Chrome

### 🐛 Bug Description

火山方舟的deepseek是支持联网功能的，但是他的联网需要新建一个应用对接bot id，对应的接口地址为https://ark.cn-beijing.volces.com/api/v3/bots，详细教程可以参考[](https://mp.weixin.qq.com/s/H4YIy6OBnwP08qqU6dg2nw)
但是目前的lobe服务商里填写bot id和api key无法通过检查。

![Image](https://github.com/user-attachments/assets/e8729099-08e6-4c40-89c2-d399326c5f62)

### 📷 Recurrence Steps

_No response_

### 🚦 Expected Behavior

_No response_

### 📝 Additional Information

_No response_

Labels: released
State: closed
Support for OpenAI's Responses API Image Generation Tool

### Description

https://openai.com/index/new-tools-and-features-in-the-responses-api/

I recently noticed that OpenAI has introduced the Responses API Image Generation Tool. I think it would be a wonderful addition if this SDK could support this new feature in the future.

If possible, could you please consider adding support for the Responses API Image Generation Tool? I believe it would bring even more value and flexibility to the SDK, especially for users who need to generate images as part of their workflow.




### AI SDK Version

_No response_

Labels: feature, ai/provider, provider/openai
State: closed
AzureAISearchTool - Object has no attribute 'semantic_config_name'

### What happened?

**Bug Description**
When attempting to run the `AzureAISearchTool.create_hybrid_search()`, we are receiving the error message `ValueError: Error from Azure AI Search: 'AzureAISearchConfig' object has no attribute 'semantic_config_name'`

**To Reproduce**
```python
_cog_search_tool = AzureAISearchTool.create_hybrid_search(
    name="call_cog_search",
    endpoint=_settings.COG_SEARCH_ENDPOINT,
    index_name=_settings.COG_SEARCH_INDEX,
    credential=AzureKeyCredential(_settings.COG_SEARCH_KEY),
    vector_fields=["description_vector"],
    search_fields=["v_description", "description"],
    select_fields=[
        "product_id",
        "product_description",
        "dims"
    ],
    top=7
)
```
We have attempted to set the semantic_config_name explicitly to `None` to no avail. 

**Expected behavior**
The AzureAISearchTool is able to hit the CogSearch endpoint and aggregate the results.

**Additional context**
Attempted versions 0.5.2 - 0.5.5. Issues remains across all versions.


### Which packages was the bug in?

Python Extensions (autogen-ext)

### AutoGen library version.

Python 0.5.5

### Other library version.

_No response_

### Model used

_No response_

### Model provider

Azure OpenAI

### Other model provider

_No response_

### Python version

3.13

### .NET version

None

### Operating system

MacOS

State: closed
是否支持InternVL2.5 和 deepseek-vl2 的SFT？

### Reminder

- [X] I have read the README and searched the existing issues.

### System Info

如题，感谢回复。

### Reproduction

None

### Expected behavior

_No response_

### Others

_No response_

Labels: duplicate
State: closed
[Request] 火山引擎能否支持调用 bot

### 🥰 需求描述

火山引擎能否支持调用 bot？

目前火山引擎默认的调用网址是：https://ark.cn-beijing.volces.com/api/v3

但是如果是要调用火山引擎中的 bot 需要调用 https://ark.cn-beijing.volces.com/api/v3/bot

### 🧐 解决方案

是否可以提供一个按钮选择这个模型是否是 bot，从而走不同的 base url

### 📝 补充信息

_No response_

Labels: released
State: closed
Following the `MultiModalMessage` example ends up in json decoder error.

### What happened?

**Describe the bug**

There is a section in the [Autogen Agent Chat User Guide on Agents](https://microsoft.github.io/autogen/stable//user-guide/agentchat-user-guide/tutorial/agents.html) that demonstrates how to send a `MultiModalMessage` (with an image) to an LLM-based agent. When following the steps and running the example code as-is, it throws the following error:

```bash
TypeError: Object of type Image is not JSON serializable
```

**To Reproduce**
1. Go to the tutorial page mentioned above.
2. Follow the code example where MultiModalMessage is created with an image using PIL.Image.
3. Execute the code.

**Expected behavior**
The code should work as per the documentation instead throwing any `serialize` related error.

**Screenshots**
Not accplicable.

**Additional context**
Below is the code i have tried to run.
```python

import asyncio
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.messages import MultiModalMessage
from autogen_ext.models.openai import OpenAIChatCompletionClient
from dotenv import load_dotenv
from autogen_core import Image
import PIL
from io import BytesIO
import  requests
load_dotenv(".env")

model_client = OpenAIChatCompletionClient(
    model = "gemini-2.0-flash"
)

ocr_agent = AssistantAgent(
    name='ocr_agent',
    model_client=model_client,
    system_message="""You are a helpful agent."""
)
async def main():

    pil_image = PIL.Image.open(BytesIO(requests.get("https://picsum.photos/300/200").content))
    img = Image(pil_image)
    multi_modal_message = MultiModalMessage(content=["Can you describe the content of this image?", img], source="user")
    result = await ocr_agent.run(task=multi_modal_message)
    print(result.messages[-1].content)


if __name__ == "__main__":
    asyncio.run(main())

```


### 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

gemini-2.0-flash

### Model provider

Google Gemini

### Other model provider

_No response_

### Python version

3.12

### .NET version

None

### Operating system

Ubuntu

Labels: needs-triage
State: closed
Exceptions from MCP server tool calls aren't serialized properly

### What happened?

**Describe the bug**

The exception that comes from the `_format_errors` in the MCP tools _base .py file is ok; however, that exception is then caught in the StaticWorkbench (https://github.com/microsoft/autogen/blob/eba05aed371a08092e9d9474b8399884957201ee/python/packages/autogen-core/src/autogen_core/tools/_static_workbench.py#L60) and is cast to a string (e.g. `unhandled errors in a TaskGroup`) 

The `return_value_as_string` gets called and tries to iterate through the items in the above string and serialize them (`return_value_as_string` in McpToolAdapter class); since items are not TextContent or EmbeddedResource (they are chars), it returns '{}' for each character in the string, so the actual error that gets returned to the user looks like this:

```
[{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]
```


**To Reproduce**

Call an MCP server tool that throws an exception.

**Expected behavior**
An actual exception should be displayed, but we get:

```
[{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]
```

### Which packages was the bug in?

Python Extensions (autogen-ext)

### 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
Not able to use AnthropicsBedrockClient, Not able to import

### What happened?

**Describe the bug**
I am getting following import while using the AnthroipcsBedrockClient using Autogen-ext[Anthropics]==0.5.6 package:

  File "C:\Users\ajaiman\Projects\code\Official\AgenticAI-ITSM\app\utils\bedrock_llm_anthropics.py", line 8, in <module>
    from autogen_ext.models.anthropic import AnthropicBedrockChatCompletionClient
ImportError: cannot import name 'AnthropicBedrockChatCompletionClient' from 'autogen_ext.models.anthropic' (C:\Users\ajaiman\Projects\code\Official\AgenticAI-ITSM\.venv2\Lib\site-packages\autogen_ext\models\anthropic\__init__.py)

**To Reproduce**
Using the following code:

config = {
            "model": "anthropic.claude-3-5-sonnet-20240620-v1:0",
            "temperature": 0.1,
            "model_info": {
                "vision": True,
                "function_calling": True,
                "json_output": True,
                "family": ModelFamily.CLAUDE_3_5_SONNET,
                "structured_output": True
            },
                "bedrock_info": {
                "aws_access_key": AWS_ACCESS_KEY_ID,
                "aws_secret_key": AWS_SECRET_ACCESS_KEY,
                "aws_region": AWS_REGION,
            },
        }
anthropic_client = AnthropicBedrockChatCompletionClient(**config)
model_result = await anthropic_client.create(
        messages=[UserMessage(content="Whats the weather in Paris?", source="User")]
    )
    print(model_result)

**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 0.5.6

### Other library version.

_No response_

### Model used

anthropic.claude-3-5-sonnet-20240620-v1:0

### Model provider

AWS Bedrock

### Other model provider

_No response_

### Python version

3.11

### .NET version

None

### Operating system

Windows

Labels: proj-extensions
State: closed
[Bug] 谷歌模型下的 使用模型内置搜索引擎 开关无效

### 📦 部署环境

Docker

### 📦 部署模式

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

### 📌 软件版本

1.64.0

### 💻 系统环境

Windows, macOS, iOS

### 🌐 浏览器

Safari, Firefox

### 🐛 问题描述

![Image](https://github.com/user-attachments/assets/309ad2b4-1707-4488-9068-1c5cd5426e62)
按照我的理解，这个 `使用模型内置搜索引擎` 按钮应该控制着使用模型API内置搜索和SearXNG搜索的切换，因为在不支持内置搜索的模型上开启搜索用的就是SearXNG。
但实际上无论这个开关的开启与否，都只会使用模型内置的搜索，不会使用SearXNG，至少在Gemini 2.0 flash上是这样。

不知道是不是我对这个开关的理解有问题，希望能在文档里详细写下。

### 📷 复现步骤

_No response_

### 🚦 期望结果

_No response_

### 📝 补充信息

_No response_

Labels: released
State: closed
Could you please add model support for gpt-4o-mini-search-preview-2025-03-11?

### What happened?

**Describe the bug**
I get a model not found error when trying to use this model from openAI

**To Reproduce**
Try using this model: gpt-4o-mini-search-preview-2025-03-11 in agent chat assistant agent.  The output is:

 ERROR holodeck.llm.single_agentid-1746733866500-9960: ValueError: The agent name must be a valid Python identifier. Error: model_info is required when model name is not a valid OpenAI model


**Expected behavior**
This model is supported in agent chat since it is under the completions api

This should be easy to just add this model support under your model list but I did not see it there


### Which packages was the bug in?

Python AgentChat (autogen-agentchat>=0.4.0)

### AutoGen library version.

Python 0.4.8

### Other library version.

_No response_

### Model used

gpt-4o-mini-search-preview-2025-03-11

### Model provider

OpenAI

### Other model provider

_No response_

### Python version

3.12

### .NET version

None

### Operating system

None

Labels: needs-triage
State: closed
SelectorGroupChat with selector_func() Serialization Issue

### What is the doc issue?

**Describe the issue**
As per the [Serializing Components](https://microsoft.github.io/autogen/stable//user-guide/agentchat-user-guide/serialize-components.html) doc, we can serialize/dump Teams as well, but there seems to be a feature gap/bug because of which while taking a dump of [SelectorGroupChat](https://microsoft.github.io/autogen/stable//user-guide/agentchat-user-guide/selector-group-chat.html), it skips Custom Selector Function(selector_func()).

Can someone confirm the same behaviour? Is it a known issue?

**What do you want to see in the doc?**
We should explicitly call out such feature gaps/bugs, as selector_func() is crucial for more control over the orchestration of the workflow, and running this config on the studio/framework will not work.




### Link to the doc page, if applicable

https://microsoft.github.io/autogen/stable//user-guide/agentchat-user-guide/serialize-components.html

Labels: documentation, needs-triage
State: closed
[Bug] Bedrock - Claude 3.7 Failing w/ValidationException

### 📦 Platform

Self hosting Docker

### 📦 Deploymenet mode

server db(lobe-chat-database image)

### 📌 Version

v1.65.0

### 💻 Operating System

Ubuntu

### 🌐 Browser

Chrome

### 🐛 Bug Description

Requests to Bedrock -> Claude 3.5 and other models works fine. Requests to Claude 3.7 work fine via console/playground. Requests to Claude 3.7 via Lobe fail with:

```
{
  "error": {
    "body": {
      "attempts": 1,
      "requestId": “1234343-4343434-43434”,
      "httpStatusCode": 400,
      "totalRetryDelay": 0
    },
    "type": "ValidationException",
    "message": "Invocation of model ID anthropic.claude-3-7-sonnet-20250219-v1:0 with on-demand throughput isn’t supported. Retry your request with the ID or ARN of an inference profile that contains this model."
  },
  "region": "us-west-2",
  "provider": "bedrock"
}
```

### 📷 Recurrence Steps

Make any call to Bedrock -> Claude v3.7 after confirming access to the model via AWS console.

### 🚦 Expected Behavior

_No response_

### 📝 Additional Information

_No response_

Labels: released
State: closed