alfin06/swegent-issues-filtered huggingface dataset:
Class AzureAISearchTool without an implementation for abstract method '_get_embedding'

### What happened?

**Describe the bug**
Traceback (most recent call last):
  File "/Users/chenghaolu/workspace/cloud-lab-python/rag_demo_v1.py", line 112, in <module>
    vector_search = AzureAISearchTool.create_vector_search(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chenghaolu/workspace/cloud-lab-python/.venv/lib/python3.12/site-packages/autogen_ext/tools/azure/_ai_search.py", line 997, in create_vector_search
    return cls(
           ^^^^
TypeError: Can't instantiate abstract class AzureAISearchTool without an implementation for abstract method '_get_embedding'

**To Reproduce**
create a index in azure aiseach
upload document

run this code
```python
vector_search = AzureAISearchTool.create_vector_search(
    name="vector_search",
    endpoint="",
    index_name="demo",
    credential=AzureKeyCredential(""),
    vector_fields=["embedding"],
    select_fields=["title", "content", "url"],
    top=5,
)

rag_assistant = AssistantAgent(
    name="rag_assistant", model_client=model_client, tools=[vector_search]
)

asyncio.run(rag_assistant.run(task="how to run apiserver locally?", cancellation_token=None))
```
**Expected behavior**
Method should be implemented

**Screenshots**
None

**Additional context**
None


### Which packages was the bug in?

Python Extensions (autogen-ext)

### AutoGen library version.

Python 0.5.1

### Other library version.

_No response_

### Model used

_No response_

### Model provider

Azure OpenAI

### Other model provider

_No response_

### Python version

3.12

### .NET version

None

### Operating system

MacOS

Labels: needs-triage
State: closed
ImportError: cannot import name 'IncludeEnum' from 'chromadb.api.types'

### What happened?

I am trying to run the code provided in the notebook : https://github.com/microsoft/autogen/blob/22301614478469e74df410626eec03cca535b864/python/packages/autogen-core/docs/src/user-guide/agentchat-user-guide/memory.ipynb


```
import os
from pathlib import Path

from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.ui import Console
from autogen_ext.memory.chromadb import ChromaDBVectorMemory, PersistentChromaDBVectorMemoryConfig
from autogen_ext.models.openai import OpenAIChatCompletionClient
```
Getting the below Error:


```
ImportError                               Traceback (most recent call last)
Cell In[1], line 6
      4 from autogen_agentchat.agents import AssistantAgent
      5 from autogen_agentchat.ui import Console
----> 6 from autogen_ext.memory.chromadb import ChromaDBVectorMemory, PersistentChromaDBVectorMemoryConfig
      7 from autogen_ext.models.openai import OpenAIChatCompletionClient
      9 # Initialize vector memory

File ~/anaconda3/envs/autogen4/lib/python3.12/site-packages/autogen_ext/memory/chromadb.py:12
     10 from chromadb.api import ClientAPI
     11 from chromadb.api.models.Collection import Collection
---> 12 from chromadb.api.types import Document, IncludeEnum, Metadata
     13 from pydantic import BaseModel, Field
     14 from typing_extensions import Self

ImportError: cannot import name 'IncludeEnum' from 'chromadb.api.types' (.. .. /anaconda3/envs/autogen4/lib/python3.12/site-packages/chromadb/api/types.py)
```

### Which packages was the bug in?

Python Ext (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

3.12

### .NET version

None

### Operating system

Ubuntu

State: closed
Add Support for Image Inputs with Perplexity Provider

### Description

Perplexity AI now supports image inputs https://docs.perplexity.ai/guides/image-guid. It would be helpful if vercel/ai could add support for sending images to the Perplexity provider, enabling multimodal queries. This would keep the integration up to date and allow users to use Perplexity’s new image features.

Labels: feature, ai/provider, provider/perplexity
State: closed
Amazon Bedrock + streamText + maxSteps often leads to APICallError

### Description

When using the Amazon Bedrock provider (v2.2.8), along with streamText and a high-ish (~20) value for maxSteps, it's not uncommon to run into an error like the following around half the time:

```
APICallError [AI_APICallError]: undefined: The text field in the ContentBlock object at messages.7.content.0 is blank. Add text to the text field, and try again.
    at file:///<snip>/lib/node_modules/@ai-sdk/amazon-bedrock/node_modules/@ai-sdk/provider-utils/dist/index.mjs:667:14
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async postToApi (file:///<snip>/lib/node_modules/@ai-sdk/amazon-bedrock/node_modules/@ai-sdk/provider-utils/dist/index.mjs:567:28)
    at async BedrockChatLanguageModel.doStream (file:///<snip>/lib/node_modules/@ai-sdk/amazon-bedrock/dist/index.mjs:740:50)
    at async fn (file://///<snip>/node_modules/ai/dist/index.mjs:5622:25)
    at async file://///<snip>/node_modules/ai/dist/index.mjs:470:22
    at async _retryWithExponentialBackoff (file://///<snip>/node_modules/ai/dist/index.mjs:271:12)
    at async streamStep (file://///<snip>/node_modules/ai/dist/index.mjs:5577:15)
```

It also dumps out the messages in question:

```
    messages: [
      // irrelevant messages omitted for brevity
      {
        role: 'assistant',
        content: [
          {
            text: '\n' +
              '\n' +
              "Let's also check the <snip> to see if there are any issues there:"
          },
          { toolUse: [Object] }
        ]
      },
      { role: 'user', content: [ { toolResult: [Object] } ] },
      {
        // >>> This appears to be the message that's breaking the API, messages.7
        role: 'assistant',
        content: [ { text: '\n\n' }, { toolUse: [Object] } ]
      },
      { role: 'user', content: [ { toolResult: [Object] } ] }
    ],
```

In particular, it seems not to like this content block: `{ text: '\n\n' }`.

I don't have specific repro steps, but it seems to happen somewhat consistently for higher maxSteps, as mentioned earlier.

Also, using Claude Sonnet 3.7, reasoning not enabled.

Labels: bug, ai/provider, provider/amazon-bedrock
State: closed
Gemini as model client with autogen 0.5

### What happened?

**Describe the bug**
I am referring to [https://microsoft.github.io/autogen/stable/user-guide/agentchat-user-guide/tutorial/models.html#gemini-experimental](https://microsoft.github.io/autogen/stable/user-guide/agentchat-user-guide/tutorial/models.html#gemini-experimental) but the documentation seems incomplete

**To Reproduce**
```
from autogen_ext.models.openai import OpenAIChatCompletionClient
model_client = OpenAIChatCompletionClient(
...     model="gemini-2.0-flash-lite",
...     api_key='<>',
... )

..._model_info.py", line 314, in get_info
    raise ValueError("model_info is required when model name is not a valid OpenAI model")
ValueError: model_info is required when model name is not a valid OpenAI model
```

How do I get it to work with Gemini.
I am using v0.5.1

### Which packages was the bug in?

Python Extensions (autogen-ext)

### AutoGen library version.

Python 0.5.1

### Other library version.

_No response_

### Model used

gemini-2.0-flash-lite

### Model provider

Google Gemini

### Other model provider

_No response_

### Python version

3.12

### .NET version

None

### Operating system

None

State: closed
ValueError: Dataclass has a union type, which is not supported. To use a union, use a Pydantic model

### What happened?

**Describe the bug**
When I run the code in the cookbook: 

- https://github.com/microsoft/autogen/blob/main/python/packages/autogen-core/docs/src/user-guide/core-user-guide/cookbook/llamaindex-agent.ipynb
- https://microsoft.github.io/autogen/stable/user-guide/core-user-guide/cookbook/llamaindex-agent.html

One error is encounted: 
ValueError: Dataclass has a union type, which is not supported. To use a union, use a Pydantic model

**To Reproduce**
Steps to reproduce the behavior. Please include code and outputs such as stacktrace.

Just follow the cookbook, step by step, and you will see

**Expected behavior**
No error

**Screenshots**
<img width="1052" alt="Image" src="https://github.com/user-attachments/assets/162d6b2b-faba-4a5f-a05d-293dd310d604" />

**Additional context**
autogen_core version: 0.5.1
llama_index version: 0.12.28


### Which packages was the bug in?

Python Core (autogen-core)

### AutoGen library version.

Python 0.5.1

### Other library version.

_No response_

### Model used

gpt-4o

### Model provider

Azure OpenAI

### Other model provider

_No response_

### Python version

3.12

### .NET version

None

### Operating system

MacOS

Labels: needs-triage
State: closed
Support repeated tool calls in a loop within `AssistantAgent`

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

Many models have been trained to call tools repeatedly until a reflection on the results. For example, Claude models have been trained to perform exactly this. 

Idea:

We can support this in `AssistantAgent` by introducing an optional `tool_call_loop` parameter to the constructor. By default, `tool_call_loop=False` which indicates the tool calls won't get into a loop -- a single tool call at most. 

User can set `tool_call_loop=True` which indicates the tool call will run in a loop until the model:
1. Produces non-tool call response, or
2. Produces a handoff tool call.

This is a start. As the next step, introduce a `ToolCallConfig` class which controls how a tool call loop should behave, with parameters for setting maximum number of iterations, preset response text, etc. -- we can consider merging `reflect_on_tool_call` into it as well. 

Please discuss and suggest ideas. 

Related:
#6261 
#5621 

Labels: help wanted, proj-agentchat
State: closed
Display message type in `Console` output

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

Make the `Console` also print out the type of messages. For example,

```
--------- TextMessage (user) -----------
xxx
--------- ToolCallRequestEvent (assistant) --------
xxxx
--------- ToolCallExecutionEvent (assistant) --------
xxxx
--------- TextMessage (assistant) ---------
xxxx
```

Labels: good first issue, help wanted, proj-agentchat
State: closed
API Error Code 400 All the time!

### What happened?

Not doing anything special, normal coding that any other Agent has no problem with and I didn't have this type of error before. 

✕ [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?

not get an error for doing basic functionality.

### Client information

<details>

```console
$ gemini /about
About Gemini CLI                                                  │
│                                                                   │
│ CLI Version            0.1.21                                     │
│ Git Commit             055fe46d                                   │
│ Model                  gemini-2.5-pro                             │
│ Sandbox                no sandbox                                 │
│ OS                     darwin                                     │
│ Auth Method            OAuth                                      │
│                            
```

</details>

### Login information

OAuth

### Anything else we need to know?

_No response_

State: closed
[Bug] Azure AI关于o1-mini模型的使用错误

### 📦 部署环境

Docker

### 📦 部署模式

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

### 📌 软件版本

v1.60.6

### 💻 系统环境

macOS

### 🌐 浏览器

Chrome

### 🐛 问题描述

当正确配置Azure AI后，o1-mini 模型无法正常使用，报错截图如下：

<img width="856" alt="Image" src="https://github.com/user-attachments/assets/c3cc2254-581e-4102-b792-9103a1fd41dc" />

存在两个问题：

1. Azure AI的URL需要打码，应当与Azure OpenAI对URL的处理逻辑一致
2. 无法使用，抓包信息如复现步骤

### 📷 复现步骤

发送包的温度被设置为0.6

<img width="696" alt="Image" src="https://github.com/user-attachments/assets/174265e7-4f9f-4976-9eda-a5da67eb6c25" />

返回的报文提示温度的值不正确：

<img width="696" alt="Image" src="https://github.com/user-attachments/assets/8e301bdc-b340-4bbd-8bb7-038c15fe8472" />

界面的报错如第一张图所示。

### 🚦 期望结果

应当与OpenAI的o系列模型保持一致的设置。

### 📝 补充信息

_No response_

Labels: released, provider:azure
State: closed
Multi-word positional arguments to MCP prompts don't seem to work

### What happened?

I called an MCP prompt with a single argument:

```
/my_command these are some words
```

My MCP server received just `"these"` as an argument.

So I tried escaping:

```
/my_command "these are some words"
```

My MCP server received just `'"these'` as an argument.

### What did you expect to happen?

I would expect:

1. If a prompt only has a single argument, the entire string after `/command_name` is passed as that argument.
2. If a prompt has multiple arguments, then splat all remaining spaced words into the last argument.
3. If a user escapes with quotes, respect the quotes and treat as a single argument.

### Client information

<details>

```console
$ gemini /about
╭──────────────────────────────────────────╮
│                                          │
│ About Gemini CLI                         │
│                                          │
│ CLI Version   0.1.21                     │
│ Git Commit    055fe46d                   │
│ Model         gemini-2.5-pro             │
│ Sandbox       no sandbox                 │
│ OS            darwin                     │
│ Auth Method   OAuth                      │
│                                          │
╰──────────────────────────────────────────╯
```

</details>

### Login information

N/A

### Anything else we need to know?

_No response_

Labels: priority/p2, area/core
State: closed
`SelectorGroupChat` to add `model_context` parameter and make the group chat manager use the model context for selecting speaker

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

This makes it possible to customize the selector and better context management. 

Related #6292 

Labels: help wanted, proj-agentchat
State: closed
Installing Task Centric Memory related dependency causes protobuf version conflicting error

### What happened?

**Describe the bug**
User may run into following error after running `pip install autogen-ext[task-centric-memory]` to install dependency

```
TypeError: Descriptors cannot be created directly.
E   If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
E   If you cannot immediately regenerate your protos, some other possible workarounds are:
E    1. Downgrade the protobuf package to 3.20.x or lower.
E    2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
```

It happens because Task Centric Memory(TCM) feature needs chromadb, chromadb has pulled opentelemetry-proto as dependency and older version of opentelemetry-proto used protobuf 3.x version to generate files which conflicts with the protobuf version in AutoGen(5.29.3).

**To Reproduce**
1. Run `pip install autogen-ext[task-centric-memory]`
2. Run `test_playwright_controller.py` you will see the error message above

**Expected behavior**
Test and TCM feature should run without error



### Which packages was the bug in?

Python Extensions (autogen-ext)

### AutoGen library version.

Python 0.5.1

### 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
AzureAISearchTool Not working as expected

### What happened?

**Describe the bug**
Getting following error when I am trying to use Hybrid Search tool with Assistant Agent.

{
    "source": "CodeAnalysisAgent",
    "models_usage": null,
    "metadata": {},
    "content": "\nTool Call Execution Results:\n\nError: Error from Azure AI Search: HTTP transport has already been closed. You may check if you're calling a function outside of the `async with` of your client creation, or if you called `await close()` on your client already.",
    "type": "ToolCallExecutionEvent"
}

Code Snippet:

hybrid_search = AzureAISearchTool.create_hybrid_search(
        name="hybrid_search",
        endpoint=AZURE_AI_SEARCH_ENDPOINT,
        index_name=VLI_DB_SEARCH_INDEX,
        credential=AzureKeyCredential(AZURE_AI_SEARCH_API_KEY),
        vector_fields=["contentVector"],
        search_fields=["title", "content", "url"],
        select_fields=["title", "content", "url"],
        top=10,
    )

db_analyze_agent = AssistantAgent(
        name="DatabaseAnalysisAgent",
        model_client=az_model_client,
        tools=[hybrid_search],
}

**To Reproduce**
Steps to reproduce the behavior. Please include code and outputs such as stacktrace.

- If your input is just "I tried X, and it didn't work" or
"X is not working", your issue will be ignored.
- If your input is not well formatted, it will hurt readability and
may be ignored as well.

**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.2

### Other library version.

_No response_

### Model used

_No response_

### Model provider

None

### Other model provider

_No response_

### Python version

3.11

### .NET version

None

### Operating system

Windows

Labels: needs-triage
State: closed
Error 400 - Please ensure that the number of function response parts is equal to the number of function call parts of the function call turn.

### What happened?

I'm using the extension in VS Code and this error repeatedly occurs when I ask for Gemini CLI change my code:

Console: Error when talking to Gemini API Full report available at: ...gemini-client-error-Turn.run-sendMessageStream-....json

✕ [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?

That the gemini CLI ends the entire request, but he stops in the middle of an action and I get this error

### Client information


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


### Login information

_No response_

### Anything else we need to know?

_No response_

Labels: status/need-triage
State: closed
AgentChat messages should have an `id` field.

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

Message id is useful to correlate `ModelClientStreamingChunkEvent` with the eventual completed message being produced. 

This should be added to `BaseChatMessage` and `BaseAgentEvent` as an `id: str` field. For `ModelClientStreamingChunkEvent`, it should have a separate optional field `full_message_id: str | None = None` to reference the complete message that may come after the chunks. So the consumer of the stream don't need to double-print it. 

Labels: help wanted, proj-agentchat
State: closed
[Request] 增加火山引擎新的豆包模型

### 🥰 需求描述

需要增加Doubao 1.5 Pro 32k和Doubao 1.5 Vision Pro 32k的最新模型

### 🧐 解决方案

需要增加Doubao 1.5 Pro 32k和Doubao 1.5 Vision Pro 32k的最新模型

### 📝 补充信息

_No response_

Labels: released
State: closed
Support anyOf property types in convert_tools for Ollama clients

### What happened?

**Describe the bug**  
A `KeyError: 'type'` occurs when an Ollama‑backed agent attempts to load a tool schema that includes an `anyOf` clause without a top-level `type` field. This happens, for example, with the `google_search` tool used by **Deep Research Team** in Autogen Studio.

The `convert_tools` function should:
- Detect the absence of a top-level `type` and resolve it from the first non-`null` variant in `anyOf`.
- Fall back to `"string"` when no explicit type can be inferred.
- Maintain compatibility with schemas that already specify a `type`.

**To Reproduce**  
Steps to reproduce the behavior:

1. Create or import a team in Autogen Studio using a *research-assistant* agent with the `google_search` tool (schema example below).
2. Configure the agent to run on an Ollama model that supports function-calling, e.g., `PetrosStav/gemma3-tools:12b`.
3. Trigger a task that invokes the tool.

**Expected behavior**  
The agent should call the tool successfully.

**Actual behavior**  
The runtime crashes with the following traceback:

```
KeyError: 'type'
  File ".../autogen_ext/models/ollama/_ollama_client.py", line 277, in convert_tools
```

The failure stems from this part of the code, which directly accesses `spec["type"]` without checking:

```python
ollama_properties[prop_name] = OllamaTool.Function.Parameters.Property(
    type=prop_schema["type"],
    description=prop_schema["description"] if "description" in prop_schema else None,
)
```

**Screenshots / Schema Example**  
Example from the `google_search` schema—note `content_max_length` uses `anyOf` but lacks a top-level `type`:

```jsonc
{
  "name": "google_search",
  "parameters": {
    "properties": {
      "content_max_length": {
        "anyOf": [
          { "type": "integer" },
          { "type": "null" }
        ],
        "default": 10000,
        "description": "content_max_length"
      }
    }
  }
}
```

**Additional context**  
Thanks for reviewing!

### Which packages was the bug in?

Python Extensions (autogen-ext)

### AutoGen library version.

Python dev (main branch)

### Other library version.

_No response_

### Model used

ollama PetrosStav/gemma3-tools:12b

### Model provider

Ollama

### Other model provider

_No response_

### Python version

3.10

### .NET version

None

### Operating system

Ubuntu

Labels: needs-triage
State: closed