alfin06/swegent-issues-filtered huggingface dataset:
[FEATURE] Add cached token metrics support to Usage class

### Problem Statement

The current `Usage` class in `strands/types/event_loop.py` only tracks basic token metrics (`inputTokens`, `outputTokens`, `totalTokens`). However, Amazon Bedrock's converse API now returns additional cached token metrics (`cacheReadInputTokens` and `cacheWriteInputTokens`) that provide valuable insights into:

- Caching efficiency and performance optimization
- Cost savings from prompt/tool caching
- Cache hit rates for better observability

Currently, these metrics are lost and users cannot track the effectiveness of their caching strategies.

### Proposed Solution

Extend the `Usage` TypedDict to include optional cached token fields while maintaining 100% backward compatibility:

```python
class Usage(TypedDict, total=False):
    inputTokens: Required[int]
    outputTokens: Required[int] 
    totalTokens: Required[int]
    cacheReadInputTokens: Optional[int]  # NEW - tokens read from cache
    cacheWriteInputTokens: Optional[int] # NEW - tokens written to cache
```

This follows the existing project pattern used in AnthropicConfig with Required/Optional annotations.

### Use Case

1. **Cost Optimization**: Users can measure actual cost savings from caching
2. **Performance Monitoring**: Track cache hit rates to optimize prompt/tool design
3. **Debugging**: Understanding why caching isn't working as expected
4. **Observability**: EventLoopMetrics can display cache efficiency in summaries

Example usage:
```python
agent = Agent(model=BedrockModel(cache_prompt="default"))
response = agent("Complex prompt...")
# Now users can see: "Cache: read=150 tokens, write=50 tokens, efficiency=75%"
```

### Alternatives Solutions

1. Create separate CachedUsage class - but this breaks consistency
2. Add to Metrics class - but Usage is the logical place for token counts
3. Model-specific extensions - but Usage should be provider-agnostic

### Additional Context

- Amazon Bedrock documentation: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-caching.html
- Bedrock API already returns these fields in converse response
- Implementation is backward compatible - no breaking changes
- Follows existing TypedDict patterns in the codebase
- Ready to implement following contribution guidelines

State: closed
[Bug] Not all Qwen models support the "enable_search" parameter

### 📦 Environment

Docker

### 📌 Version

v1.43.1

### 💻 Operating System

Other Linux

### 🌐 Browser

Chrome

### 🐛 Bug Description

In #5039, we added the `enable_search` parameter to Qwen model requests according to the [documentation](https://help.aliyun.com/zh/dashscope/developer-reference/qwen-api#ea3869ca53mh4). However, not all Qwen models support this parameter. e.g. `qwen2.5-3b-instruct`.

https://github.com/lobehub/lobe-chat/blob/89a60e3e19aec8fae032dbb7f1b208ff493b3e04/src/libs/agent-runtime/qwen/index.ts#L36-L41

![image](https://github.com/user-attachments/assets/da70e575-8494-415f-b2ea-ae17abdbd1bd)

### 📷 Recurrence Steps

_No response_

### 🚦 Expected Behavior

_No response_

### 📝 Additional Information

_No response_

Labels: released
State: closed
Poor performance when using Gemini image output with `streamText`

### Description

I tried using the Gemini image output, but found that when used with streamText, the response was very slow (tens of seconds to 1 minute). 

To figure out where the issue was, I tried using generateText, and this time I got the result quickly (within seconds).

I also tried to call the API (`/v1beta/models/gemini-2.0-flash-exp:streamGenerateContent?alt=sse`) with curl directly, which also response very fast. So I guess there's something happening inside `streamText`

Here's the minimal test code:

### Code example

```
import { google } from '@ai-sdk/google'
import { generateText, streamText } from 'ai'

const model = google('gemini-2.0-flash-exp')

const result = await generateText({
  model,
  providerOptions: {
    google: { responseModalities: ['TEXT', 'IMAGE'] },
  },
  prompt: 'Generate an image of a black cat',
})

console.log('non stream result', result)

const streamResult = streamText({
  model,
  providerOptions: {
    google: { responseModalities: ['TEXT', 'IMAGE'] },
  },
  prompt: 'Generate an image of a black cat',
})

for await (const chunk of streamResult.fullStream) {
  console.log(chunk)
}
```

### AI provider

@ai-sdk/google: 1.2.1

### Additional context

Node.js 23

Labels: bug, ai/provider, provider/google
State: closed
Skip empty chunks in streaming mode

In `BaseOpenAIChatCompletionClient.create_stream`, skip empty chunks when encountered rather than throwing errors.

Remove `max_consecutive_empty_chunk_tolerance` from create_stream method. 

Labels: needs-triage, proj-extensions
State: closed
[Bug] 接入openai兼容代理，获取模型列表报错

### 📦 Environment

Vercel

### 📌 Version

1.44.1

### 💻 Operating System

Windows

### 🌐 Browser

Chrome

### 🐛 Bug Description

>  302AI是一个AI聚合商，类似于OpenRouter，提供openai兼容的代理：https://api.302.ai/v1

- 在更新1.44.0和1.44.1之前在openai中填写代理地址，可以成功获取模型列表，更新后获取模型列表失败，报错：`value too long for type character varying(10)`
- 使用1.44.0之后新增的自定义服务商，选择openai兼容，获取模型列表依然失败，报错：`value too long for type character varying(10)`
- 浏览器控制台报错接口为：`https://example.com/trpc/lambda/aiModel.batchUpdateAiModels?batch=1`
- 请求cURL位于附件中：
[cURL.txt](https://github.com/user-attachments/files/18342141/cURL.txt)



### 📷 Recurrence Steps

1. 打开设置中AI服务商
2. 选择OpenAI
3. 填入API key
4. 填入https://api.302.ai/v1
5. 点击连通性检查
6. 连通性检查成功后点击获取模型列表，报错`value too long for type character varying(10)`

### 🚦 Expected Behavior

成功获取模型列表

### 📝 Additional Information

_No response_

Labels: released
State: closed
[Bug] 1.44.2版本环境变量OPENAI_MODEL_LIST语法失效

### 📦 Environment

Vercel

### 📌 Version

1.44.2

### 💻 Operating System

Other

### 🌐 Browser

Firefox

### 🐛 Bug Description

vercel部署最新版本1.44.2，环境变量OPENAI_MODEL_LIST中的 [模型定义语法规则 ](https://lobehub.com/zh/docs/self-hosting/advanced/model-list)失效，仅有部分与官方模型名称一致的模型被成功识别，其他模型出现以下问题之一：
1. 未设置的模型被自动启用(自动启用OpenAI o1-mini、GPT-4o 1120等官方模型)
2. 环境变量中设置的模型未被启用（自定义名称的模型未被启用，如 doubao-pro-32k 未被启用）
3. 环境变量中设置的自定义模型名称未生效（自定义名称的模型的名称显示为渠道模型名称，而不是根据 模型定义语法规则 设置的自定义名称，如 doubao-pro-32k 不展示为自定义的 Doubao pro）

### 📷 Recurrence Steps

_No response_

### 🚦 Expected Behavior

_No response_

### 📝 Additional Information

_No response_

Labels: released
State: closed
[Bug] Error since v1.44.3

### 📦 Environment

Docker

### 📌 Version

v1.44.3

### 💻 Operating System

Ubuntu

### 🌐 Browser

Chrome

### 🐛 Bug Description

Docker log:
 ```
⨯ Error: you must `import '@anthropic-ai/sdk/shims/web'` before importing anything else from @anthropic-ai/sdk

    at c (.next/server/chunks/59790.js:1:46337)

    at 605046 (.next/server/chunks/59790.js:2:5651)

    at t (.next/server/webpack-runtime.js:1:143)

    at 640279 (.next/server/chunks/87253.js:214:6072)

    at t (.next/server/webpack-runtime.js:1:143)

    at 702947 (.next/server/chunks/87253.js:230:77104)

    at t (.next/server/webpack-runtime.js:1:143)

    at 778403 (.next/server/chunks/87253.js:174:3342)

    at Object.t [as require] (.next/server/webpack-runtime.js:1:143) {

  digest: '1965366038'

}
```

### 📷 Recurrence Steps

_No response_

### 🚦 Expected Behavior

_No response_

### 📝 Additional Information

_No response_

Labels: released
State: closed
[BUG] EmbeddedResource, Resource, Audio content type dropped in MCP tool results

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

### Python Version

3.13.2

### Operating System

macOS 15.5

### Installation Method

other

### Steps to Reproduce

1. Create or use an MCP tool that returns multiple content types, including EmbeddedResource.
2. Call the tool using MCPClient.
3. Observe that only MCPTextContent and MCPImageContent are mapped and returned; EmbeddedResource is dropped with a debug log entry.

### Expected Behavior

All supported content types, including EmbeddedResource, should be mapped and returned in the tool result. The SDK should provide a mapping for EmbeddedResource similar to other content types.

### Actual Behavior

MCPClient only maps MCPTextContent and MCPImageContent. EmbeddedResource is dropped, causing loss of resources and incomplete tool results for users relying on EmbeddedResource outputs.

### Additional Context

This was discovered while trying to use the github MCP `get_file_contents` tool.

https://github.com/github/github-mcp-server/blob/efef8ae27a1d62c38c8f760ca38a65845efd3576/pkg/github/repositories.go#L449

Even if called directly:

```python
agent.tool.get_file_contents(owner="example-org", repo="example-repo", path="README.md")
```

Result:
```
{'status': 'success', 'toolUseId': 'tooluse_get_file_contents_771272973', 'content': [{'text': 'successfully downloaded text file (SHA: abc123)'}]}
```

Log:
```
DEBUG | strands.tools.mcp.mcp_client | [Thread: ThreadPoolExecutor-1_0, Session: a4cad7a7-09f2-44be-8fc5-6c5a14d0c178] unhandled content type: EmbeddedResource - dropping content
```

### Possible Solution

Extend `_map_mcp_content_to_tool_result_content` in `src/strands/tools/mcp/mcp_client.py` to add support for EmbeddedResource.

### Related Issues

_No response_

Labels: bug, area-mcp
State: closed
[Bug] github 服务商配置不正常

### 📦 部署环境

Docker

### 📌 软件版本

v1.45.0

### 💻 系统环境

Windows

### 🌐 浏览器

Edge

### 🐛 问题描述

![lobe](https://github.com/user-attachments/assets/8fd6b54b-3702-4d34-a6c7-ba9e5ae06737)

左边为Lobechat服务端数据库部署模式而右边为Lobechat客户端数据库模式。对于github中的模型，使用同样的api key，客户端数据库模式可以正常使用。但是，服务端数据库部署模式对github api key检查不通过且无法使用其中的模型，其他服务商模型一切正常。

On the left is the deployment pattern for the Lobechat server-side database, and on the right is the Lobechat client-side database pattern. When using models from GitHub, the client-side database pattern works correctly with the same API key. However, the server-side database deployment pattern fails the GitHub API key check and cannot use models from GitHub, while models from other providers function normally.

### 📷 复现步骤

使用相同的github api key进行检查，已确认api key准确无误，更换其他github api key仍然无效。

The same GitHub API key was used for verification, and it has been confirmed to be accurate. Replacing it with another GitHub API key still does not work.

### 🚦 期望结果

希望正常使用github中的模型。

I want to be able to use GitHub models normally.

### 📝 补充信息

_No response_

Labels: released
State: closed
Allow resetting Society of Mind agent even if it hasn't been run before

### What happened?

Currently if you call `on_reset` on a society of mind agent before `.run()` it will raise an error suggesting that the group chat needs to be initialized before it can be reset. @ekzhu  and I discussed that this behavior is a bug.

<img width="877" alt="Image" src="https://github.com/user-attachments/assets/efcfad04-21fa-4d9d-bb8e-ad6251fba174" />

### What did you expect to happen?

no bugs

### How can we reproduce it (as minimally and precisely as possible)?

Adapted from https://microsoft.github.io/autogen/stable/reference/python/autogen_agentchat.agents.html#autogen_agentchat.agents.SocietyOfMindAgent

```python
import asyncio
from autogen_agentchat.messages import TextMessage
from autogen_agentchat.agents import AssistantAgent, SocietyOfMindAgent
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_agentchat.teams import RoundRobinGroupChat
from autogen_agentchat.conditions import TextMentionTermination


async def main() -> None:
    model_client = OpenAIChatCompletionClient(model="gpt-4o")

    agent1 = AssistantAgent("assistant1", model_client=model_client, system_message="You are a writer, write well.")
    agent2 = AssistantAgent(
        "assistant2",
        model_client=model_client,
        system_message="You are an editor, provide critical feedback. Respond with 'APPROVE' if the text addresses all feedbacks.",
    )
    inner_termination = TextMentionTermination("APPROVE")
    inner_team = RoundRobinGroupChat([agent1, agent2], termination_condition=inner_termination)

    society_of_mind_agent = SocietyOfMindAgent("society_of_mind", team=inner_team, model_client=model_client)

    await society_of_mind_agent.on_reset(cancellation_token=None)

    result = await society_of_mind_agent.on_messages(messages=[
        TextMessage(source="user", content="I am a writer.")
        ], 
        cancellation_token=None
    )
    print(result)


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

### AutoGen version

0.4.5

### Which package was this bug in

AgentChat

### Model used

gpt-4o

### Python version

_No response_

### Operating system

_No response_

### Any additional info you think would be helpful for fixing this bug

_No response_

Labels: proj-agentchat
State: closed
[Bug] 在 OpenAI 模型中添加了 gemini 1.5 带有视觉的模型，在聊天页面不支持粘贴剪贴板中的图片，手动上传图片可以识别

### 📦 部署环境

Docker

### 📌 软件版本

v1.45.4

### 💻 系统环境

Windows

### 🌐 浏览器

Edge

### 🐛 问题描述

在 OpenAI 模型中添加了 gemini 1.5 带有视觉的模型（确认添加的时候勾选了 vision 选项），在聊天页面不支持粘贴剪贴板中的图片，手动上传图片可以识别。如果是直接使用 OpenAI 4o mini 则可以粘贴剪贴板中的图片。

### 📷 复现步骤

在 OpenAI 模型中添加了 gemini 1.5 带有视觉的模型（确认添加的时候勾选了 vision 选项），在聊天页面不支持粘贴剪贴板中的图片

### 🚦 期望结果

在 OpenAI 模型中添加了 gemini 1.5 带有视觉的模型（确认添加的时候勾选了 vision 选项），在聊天页面支持粘贴剪贴板中的图片

### 📝 补充信息

_No response_

Labels: released, provider:gemini, feature:vision
State: closed
Vertex Anthropic: custom headers remove the authentication

### Description

In the VertexAnthropic wrapper, passing custom headers completely remove the authentication from the headers:

https://github.com/vercel/ai/blob/e5deeaea50f93a09cfc1b6037feab205043e249c/packages/google-vertex/src/anthropic/google-vertex-anthropic-provider-node.ts#L22-L35

I wanted to opened a PR but I'm not sure of the recommended way of doing this. Without this `Resolvable` abstraction I would have done this:

```ts
(async () => ({ 
         Authorization: `Bearer ${await generateAuthToken( 
           options.googleAuthOptions, 
         )}`, 
         ...options.headers
       }))
```

But with the `Resolvable` I'm not sure of the best way, we could either:
1. expose generateAuthToken from this SDK so the caller will have to add this Authorization themself
2. call `resolve` on `options.headers` and then create a new `Resolvable` from the result (with the spreaded headers), but I have the feeling that calling `resolve` should be done "at the edge" as it might have side effects.

I can implement the fix once we decided about the correct fix

### Code example

```ts
const vertexAnthropic = createVertexAnthropic({
  project: "GCP_PROJECT",
  location: "GCP_REGION" ,
  headers: {
    "anthropic-beta": "token-efficient-tools-2025-02-19",
  }
})
```

This will fail with 401 because the other headers are removed

### AI provider

_No response_

### Additional context

_No response_

Labels: bug, ai/provider, provider/anthropic, provider/google-vertex
State: closed
[Bug] 1.45.6 服务器部署版本老用户在对话时的模型选择参数异常

### 📦 Environment

Vercel

### 📌 Version

1.45.6

### 💻 Operating System

Other Linux

### 🌐 Browser

Firefox

### 🐛 Bug Description

服务器部署版本老用户在对话时的模型选择参数异常。如下图可以看到新老用户的模型名称一致，但是老用户部分模型未支持token显示。新用户使用的是环境变量中的模型配置信息，老用户在AI服务商界面已经设置这些模型的参数（因为老用户似乎不会使用默认的模型配置信息）。
新用户的模型选择：
![804783b5391551eb82910b9d387d92e5](https://github.com/user-attachments/assets/9e9fa229-96f2-4981-b1c3-d75f23aaff81)
老用户的模型选择：
![4ec00886c4c73efa33ea62b2ef800870](https://github.com/user-attachments/assets/a3586617-c67d-4a59-97bf-a65d8fc40aca)

### 📷 Recurrence Steps

_No response_

### 🚦 Expected Behavior

对话界面的模型参数和AI服务商界面提供的完全一致。

### 📝 Additional Information

老用户在AI服务商界面已经设置了这些模型的参数，但是对话时未成功读取此配置。
![8aa619c13eb22b6b51f988c471f5a239](https://github.com/user-attachments/assets/2f3550db-41e9-4b5a-96ac-d9f9fe57c7ed)

Labels: released
State: closed
[Bug] 阿里云千问/Qwen 2.5 模型请求错误

### 📦 Environment

Docker

### 📌 Version

lobe-chat V1.45.6

### 💻 Operating System

Other Linux

### 🌐 Browser

Edge

### 🐛 Bug Description

Qwen 2.5 14B模型使用，发生模型请求错误，下面是反馈错误代码：
{
  "error": {
    "code": "invalid_parameter_error",
    "param": null,
    "message": "<400> InternalError.Algo.InvalidParameter: This model does not support enable_search.",
    "type": "invalid_request_error"
  },
  "endpoint": "https://dashscope.aliyuncs.com/compatible-mode/v1",
  "provider": "qwen"
}
![qwen2 5 14b](https://github.com/user-attachments/assets/ffd15031-5b78-4790-a995-91501d9f97f3)


### 📷 Recurrence Steps

请开发者修正相关代码

### 🚦 Expected Behavior

无法正常使用Qwen 2.5模型

### 📝 Additional Information

_No response_

Labels: released
State: closed
SelectorGroupChat example does not work with o3-mini

### What happened?

SelectorGroupChat example does not work with o3-mini. The prompt we use has the agent very eager to TERMINATE after 1 round of thinking.

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

![Image](https://github.com/user-attachments/assets/a332228c-7728-4643-b034-2f7f9af01643)

### What did you expect to happen?

For it to work like GPT-4o

### How can we reproduce it (as minimally and precisely as possible)?

Run the example, but change the model to o3-mini

### AutoGen version

0.4.5

### Which package was this bug in

AgentChat

### Model used

o3-mini

### Python version

_No response_

### Operating system

_No response_

### Any additional info you think would be helpful for fixing this bug

_No response_

Labels: proj-agentchat
State: closed
[Bug] 

### 📦 Environment

Zeabur

### 📌 Version

v1.45.6

### 💻 Operating System

macOS

### 🌐 Browser

Other

### 🐛 Bug Description

我导入了一个兼容openai的模型提供商，然后设置了两个模型。这两个模型都支持图像以及工具调用。在模型列表里可以看到两个图标，表示支持图像和工具。可是在聊天界面选择了模型之后，无法使用插件以及图片问答。
![CleanShot 2025-01-13 at 14 36 50@2x](https://github.com/user-attachments/assets/85129d5e-362f-49c4-a40e-6162df5872c7)
![CleanShot 2025-01-13 at 14 37 05@2x](https://github.com/user-attachments/assets/ea595a54-2553-444b-95bf-72119211a512)


### 📷 Recurrence Steps

_No response_

### 🚦 Expected Behavior

_No response_

### 📝 Additional Information

_No response_

Labels: released, feature:plugin, feature:vision
State: closed
Error when closing AzureAIChatCompletionClient upon a validation error

### What happened?

I'm attempting to use AzureAIChatCompletionClient with the travel_planning example, with this client:

```
client = AzureAIChatCompletionClient(
        model="gpt-4o",
        endpoint="https://models.inference.ai.azure.com",
        credential=AzureKeyCredential(os.environ["GITHUB_TOKEN"]),
        model_info={
            "json_output": True,
            "function_calling": True,
            "vision": True,
            "model": "gpt-4o",
        },
    )
```

However, I get this error:

```
Exception ignored in: <function AzureAIChatCompletionClient.__del__ at 0x740702f232e0>
Traceback (most recent call last):
  File "/home/codespace/.python/current/lib/python3.12/site-packages/autogen_ext/models/azure/_azure_ai_client.py", line 516, in __del__
    asyncio.get_running_loop().create_task(self._client.close())
                                           ^^^^^^^^^^^^
AttributeError: 'AzureAIChatCompletionClient' object has no attribute '_client'
Exception ignored in: <function AzureAIChatCompletionClient.__del__ at 0x740702f232e0>
Traceback (most recent call last):
  File "/home/codespace/.python/current/lib/python3.12/site-packages/autogen_ext/models/azure/_azure_ai_client.py", line 516, in __del__
    asyncio.get_running_loop().create_task(self._client.close())
                                           ^^^^^^^^^^^^
AttributeError: 'AzureAIChatCompletionClient' object has no attribute '_client'
Exception ignored in: <function AzureAIChatCompletionClient.__del__ at 0x740702f232e0>
Traceback (most recent call last):
  File "/home/codespace/.python/current/lib/python3.12/site-packages/autogen_ext/models/azure/_azure_ai_client.py", line 516, in __del__
    asyncio.get_running_loop().create_task(self._client.close())
                                           ^^^^^^^^^^^^
AttributeError: 'AzureAIChatCompletionClient' object has no attribute '_client'
```


### What did you expect to happen?

Success

### How can we reproduce it (as minimally and precisely as possible)?

Open travel_planning.ipynb, use that client instead

### AutoGen version

latest (editable install from Codespaces)

### Which package was this bug in

Extensions

### Model used

gpt-4o, GitHub models

### Python version

3.12

### Operating system

Linux

### Any additional info you think would be helpful for fixing this bug

_No response_

Labels: proj-extensions
State: closed
Tool for Azure AI Search

### What feature would you like to be added?

I have a use case where I have to search knowledge base with RAG,  I am usinga Azure AI search as my knowledge base. How to use the Azure AI search RAG as a separate agent/tool. Please provide the sample code.

Labels: documentation, help wanted, proj-extensions
State: closed
[Python] Samples to show how to use UserProxyAgent that takes user feedback from a frontend

SelectorGroupChat currently relies on UserProxyAgent to provide feedback during a run. 

We need a sample to show how to achieve this when the application is not running in a console. 

A minimal sample with Fast API and basic HTML. 

Also update agentchat_chainlit: https://github.com/microsoft/autogen/blob/main/python/samples/agentchat_chainlit to include a new example script showing how to use UserProxyAgent.

Labels: help wanted, proj-agentchat
State: closed
MaxMessageTermination should by default only count ChatMessage

Because AgentEvent are not conversation between agents. 

Events like `UserInputRequestedEvent` and function call related events should not be counted by default, as they are not intuitive to consider as part of the count for termination. 

Labels: needs-triage, proj-agentchat
State: closed
Improve Observability ( LLMEvents and other System Events) in AutoGen Studio

Currently, AGS shows messages exchanged by Agents (these are only the messages explicitly yielded in the agent/team implementation).
In many cases there are LLMCallEvents that are not necessarily yielded by the agents/teams (e.g., speaker selection), or even the yielded events are a subset of the actual LLMCallEvents. 

As a developer tool, it is important that AGS can let users make sense of underlying system behaviour. This can also double as data collection infrastructure.

This PR is to track efforts to show all events that occur as a team is run.

## Implementation  
- [x] Enable streaming of events to front end during run, enable storage to DB
- [x] Show a filterable log of all Events in AGS UI.

Labels: proj-studio
State: closed
[Python] Improve Custom Agent Sample in AgentChat

> One thing I am getting from this is that we probably need more COMPLETE examples of custom agents showing:
> 
> - How to extend it to use custom model clients and participate in a groupchat  
> - How to implement load/save state for serialization 
> - How to implement component config such that it can work in AGS 
> 
> We can do all of these today, we just need to show examples. our current [custom agent](https://microsoft.github.io/autogen/dev/user-guide/agentchat-user-guide/tutorial/custom-agents.html)s example falls short in these things.
> 
> What other useful things should the example show? 

 _Originally posted by @victordibia in [#5441](https://github.com/microsoft/autogen/issues/5441#issuecomment-2644196395)_

Labels: documentation, proj-agentchat
State: closed
[Bug] 智谱Embedding模型 提示向量化失败

### 📦 部署环境

Docker

### 📌 软件版本

1.46.1

### 💻 系统环境

Other Linux

### 🌐 浏览器

Chrome, Safari

### 🐛 问题描述

在对文件进行向量化时，智谱的API反馈为令牌已过期或不正确
<img width="848" alt="image" src="https://github.com/user-attachments/assets/db5412d5-11c2-481a-9be7-baffec47b44d" />
但是与此同时 Chat功能正常
<img width="1645" alt="image" src="https://github.com/user-attachments/assets/9ee22d66-8b1b-414f-8f9a-fd9f8802dfa7" />


### 📷 复现步骤

在完成.env环境变量的编辑后尝试进行文件向量化
环境变量： 
ZHIPU_API_KEY='xxxxxxxxxxx'
DEFAULT_FILES_CONFIG='embedding_model=zhipu/embedding-3'


### 🚦 期望结果

正常使用文件向量化

### 📝 补充信息

无

Labels: released, feature:files
State: closed