alfin06/swegent-issues-filtered huggingface dataset:
Potential Support for Mistral Small 24B Models?

### Reminder

- [x] I have read the above rules and searched the existing issues.

### Description

Hi there,
I was wondering if it might be possible to consider adding support for the recently released Mistral Small 24B models in LLaMA Factory? Specifically:

Mistral-Small-24B-Instruct-2501
Mistral-Small-24B-Base-2501

Thank you so much for your time and for maintaining this wonderful project!

### Pull Request

_No response_

Labels: solved
State: closed
Temperature Not Supported by Model `codex-mini-latest` with `generateText` and `temperature` set to `undefined`

### Description

It appears in `ai`: `4.3.16` with `@ai-sdk/openai`: `^1.3.22` when `openai.responses("codex-mini-latest")` it still tries to send the `temperature` param even though its explicitly set to undefined: 
```ts
  const result = await generateText({
    model: openai.responses('codex-mini-latest'),
    prompt,
    system: opts.system,
    tools,
    messages: opts.messages,
    maxSteps: opts.maxSteps,
    toolChoice: undefined,
    temperature: undefined,
    topP: opts.topP,
    experimental_prepareStep: opts.experimental_prepareStep,
  });
```
`codex-mini-latest` does not support the temperature param, so it should not be sent  or default to 0 to the `responses` api for this model. This returns this error in the api:

```
 Unsupported parameter: 'temperature' is not supported with
 this model.
```

### AI SDK Version

- `ai`: `4.3.16`
- `@ai-sdk/openai`: `^1.3.22`
- `@ai-sdk/openai`: `^1.3.22`

Labels: bug, ai/provider, provider/openai
State: closed
JSON dumping of save state on teams fails because of datateimes

### What happened?

**Describe the bug**
When a team state with `save_state` a serialization exception is raised and the state is truncated at the first datetime.

**To Reproduce**
A Swarm team was created, with only one assistant agent:
```py
# Assume existing and working model_client and project_search
project_agent = AssistantAgent(
    name="ProjectSearchAgent",
    model_client=model_client,
    tools=[project_search],
    system_message="You are a project search agent. Search for information and respond with JSON: {\"response\": \"your answer\", \"terminate\": \"TERMINATE\"}",
    output_content_type_format="json_object"
)

# Team setup
termination = TextMentionTermination("TERMINATE")
team = Swarm([project_agent], termination_condition=termination)

async def main():
    result = await team.run(task="What is a Montague?")
    
    team_state = await team.save_state()

    with open(state_file, "w") as f:
        json.dump(team_state, f) # This throws "Object of type datetime is not JSON serializable"
```

**Expected behavior**
The state should be dumped without errors, as per (documentation)[https://microsoft.github.io/autogen/stable//user-guide/agentchat-user-guide/tutorial/state.html#persisting-state-file-or-database].

**Workaround**
A good workaround is to `jsonpickle` the state. It should be documented, though

### Which packages was the bug in?

Python AgentChat (autogen-agentchat>=0.4.0)

### AutoGen library version.

Python 0.6.4

### Other library version.

autogen-ext = {extras = ["anthropic"], version = "^0.6.2"}

### Model used

eu.anthropic.claude-sonnet-4-20250514-v1:

### Model provider

AWS Bedrock

### Other model provider

_No response_

### Python version

3.13

### .NET version

None

### Operating system

MacOS

Labels: needs-triage
State: closed
GraphFlow examples failing with error

### What is the doc issue?

**Describe the issue**
In https://microsoft.github.io/autogen/stable/user-guide/agentchat-user-guide/graph-flow.html#advanced-example-conditional-loop-filtered-summary and https://microsoft.github.io/autogen/stable/user-guide/agentchat-user-guide/graph-flow.html#advanced-example-cycles-with-activation-group-examples

The two GraphFlow examples fail when run - due to missing termination condition, and ref to agent_e

**What do you want to see in the doc?**

The corrected code examples

**Additional context**

Error 1: ValueError: A termination condition is required for cyclic graphs without a maximum turn limit.
Error 2: RuntimeError: Speaker E not found in participant names.


### Link to the doc page, if applicable

https://microsoft.github.io/autogen/stable/user-guide/agentchat-user-guide/graph-flow.html

Labels: documentation, needs-triage
State: closed
[Bug] 1.68.10 更新后 Mistral 的模型均不可用

### 📦 部署环境

Docker

### 📦 部署模式

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

### 📌 软件版本

1.68.10+

### 💻 系统环境

Ubuntu

### 🌐 浏览器

Edge

### 🐛 问题描述

更新 1.68.10 之后，mistral 模型不论是正常对话/系统助手/连通性检查均报错
```json
{
  "error": {
    "headers": {
      "access-control-allow-origin": "*",
      "alt-svc": "h3=\":443\"; ma=86400",
      "cf-cache-status": "DYNAMIC",
      "cf-ray": "91d7859cdedd5fc6-SIN",
      "connection": "keep-alive",
      "content-length": "283",
      "content-type": "application/json",
      "date": "Sun, 09 Mar 2025 03:35:22 GMT",
      "ratelimitbysize-limit": "500000",
      "ratelimitbysize-query-cost": "32001",
      "ratelimitbysize-remaining": "467999",
      "ratelimitbysize-reset": "38",
      "server": "cloudflare",
      "x-envoy-upstream-service-time": "102",
      "x-kong-proxy-latency": "0",
      "x-kong-request-id": "d2f23c1a6d1b226bf4bfae566932fe16",
      "x-kong-upstream-latency": "104",
      "x-ratelimitbysize-limit-minute": "500000",
      "x-ratelimitbysize-limit-month": "1000000000",
      "x-ratelimitbysize-remaining-minute": "467999",
      "x-ratelimitbysize-remaining-month": "995733790"
    },
    "stack": "Error: 422 status code (no body)\n    at $.generate (/app/.next/server/edge-chunks/169.js:4:1841)\n    at sG.makeStatusError (/app/.next/server/edge-chunks/169.js:4:16235)\n    at sG.makeRequest (/app/.next/server/edge-chunks/169.js:4:17175)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Object.chat (/app/.next/server/edge-chunks/477.js:9:5222)\n    at async /app/.next/server/app/(backend)/webapi/chat/[provider]/route.js:1:7507\n    at async ef.do (/app/.next/server/edge-chunks/879.js:6:11181)\n    at async ef.handle (/app/.next/server/edge-chunks/879.js:6:13592)\n    at async eR.handler (/app/.next/server/edge-chunks/879.js:2:31840)\n    at async D (/app/.next/server/edge-chunks/879.js:2:4976)",
    "status": 422
  },
  "endpoint": "https://api.mistral.ai/v1",
  "provider": "mistral"
}
```

### 📷 复现步骤

更新之后稳定复现，最新版也有同样的问题，但 1.68.9 没有问题

### 🚦 期望结果

_No response_

### 📝 补充信息

_No response_

Labels: released
State: closed
[Bug]CLAUDE 3,7SONNOT模型在长对话中输出，输出内容不完整

### 📦 部署环境

Docker

### 📦 部署模式

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

### 📌 软件版本

1.69.3

### 💻 系统环境

Ubuntu

### 🌐 浏览器

Firefox, Edge

### 🐛 问题描述

CLAUDE 3,7SONNOT模型在长对话中输出，输出内容不完整

### 📷 复现步骤

在使用claude的官方API的时候，发生了内容输出到一半不输出的问题。
如下图：
![Image](https://github.com/user-attachments/assets/c8f5aa3e-7965-450d-a54e-41c7a6b8fa59)

![Image](https://github.com/user-attachments/assets/d7fa8d2a-3004-44d3-b256-8f42a0194ba6)
助手以及系统并没有设置最大token上限

claude的控制台也没报错，也没说客户端断连，每次都是4096这个值
<img width="875" alt="Image" src="https://github.com/user-attachments/assets/03885f3e-7da6-4c7c-be2f-a5a3c1d3e0f6" />
使用nextchat没有这个问题

### 🚦 期望结果

希望能够一次新更完整的输出完

### 📝 补充信息

_No response_

Labels: released
State: closed
mem0 integration is broken

### What happened?

Running the following piece of code:

```python
    client = Mem0Memory(is_cloud=True, api_key=MEM0_API_KEY, user_id='test_user')
    response = await client.add(content=MemoryContent(content='this is a test memory', mime_type=MemoryMimeType.TEXT))

```

Throws the following:
```
mem0.client.main.APIError: API request failed: {"messages":["Expected a list of items but got type \"str\"."]}
```

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

Google Gemini

### Other model provider

_No response_

### Python version

3.12

### .NET version

None

### Operating system

MacOS

Labels: needs-triage
State: closed
[BUG]  `reset_on_revisit` doesn't work with cycles/feedback loops in Graph

https://github.com/strands-agents/sdk-python/blob/8c63d75ecf9c246110d297c109bf204839978152/src/strands/multiagent/graph.py#L493

The `reset_on_revisit` feature in Graph multiagent pattern fails to enable cycles/feedback loops because `_find_newly_ready_nodes` filters out completed nodes before they can be revisited.

## Bug Details

The problematic code:

```python
def _find_newly_ready_nodes(self) -> list["GraphNode"]:
      """Find nodes that became ready after the last execution."""
      newly_ready = []
      for _node_id, node in self.nodes.items():
          if (
              node not in self.state.completed_nodes  # <- BUG: prevents revisiting
              and node not in self.state.failed_nodes
              and self._is_node_ready_with_conditions(node)
          ):
              newly_ready.append(node)
      return newly_ready
```

## Expected Behavior

When reset_on_revisit=True and a feedback edge condition is satisfied, completed nodes should be re-executed with their state reset.

## Actual Behavior

Completed nodes are never reconsidered for execution, making feedback loops impossible even when reset_on_revisit=True.

##  Impact

Cannot implement feedback loops (e.g., error correction cycles) in Graph-based multi-agent systems.

##  Suggested Fix

 Allow completed nodes to be added to newly_ready when incoming edge conditions are satisfied and revisiting is enabled.


Labels: bug, area-multiagent
State: closed
Tool parameters zod validator cannot use async refine

### Description

When using streamText with tools, i would love to extra validation beyond what is explicitly expressible with zod. Zod of course has a function for this exact use case, .refine

In my example, the extra validation requires a network call, thus the refine callback is async. Zod supports this, as long as the validation call uses .parseAsync or .safeParseAsync -- the ai sdk currently uses .safeParse, not its async counter part.

Would it be possible to switch this to support async refinement?

Example
---
```
  const result = streamText({
        system: SYSTEM_PROMPT,
        model: openAI("gpt-4.1-2025-04-14"),
        tools: {
            getFooCodeSnippet: {
                parameters: z
                    .object({
                        code: z.string(),
                    })
                    .refine(async (params) => {
                        const res = await fetch("https://foo-language-parse.com/validate", {
                            method: "POST",
                            headers: {"Content-Type": "application/json"},
                            body: JSON.stringify({
                                code: params.code,
                            }),
                        });

                        const json = await res.json();
                        return json.isValid;
                    }, "code is not valid"),
                description: "Generate a valid code for language foo",
                execute: async ({code}) => {
                    return code;
                },
            },
        },
    });
```

### AI SDK Version

- ai: 4.3.15

Labels: feature, ai/core, ai/provider, provider/openai
State: closed
[Request] 硅基的R1有function calling了

### 🥰 需求描述

硅基的R1有function calling了，如果是R1原生的fc，根据论文，相比V3是退化的，不过也不清楚硅基那边是怎么做的这个fc。很想体验它和lobechat的联网结合的效果。

### 🧐 解决方案

可以将硅基的R1归进有function calling能力的模型了。

### 📝 补充信息

具体可看硅基的[模型广场](https://cloud.siliconflow.cn/models)



Labels: released
State: closed
[Bug] 限制历史消息无法设置成0

### 📦 部署环境

Docker

### 📦 部署模式

客户端 Pglite 模式(lobe-chat-pglite 镜像)

### 📌 软件版本

v1.70.0

### 💻 系统环境

Windows

### 🌐 浏览器

Edge

### 🐛 问题描述

之前不是刚修复了历史消息不能设置成0的Bug吗，怎么新版本又不行了，每次拖到最左边就会自动变成8

![Image](https://github.com/user-attachments/assets/804ffa59-853f-4262-9450-1439538c526c)

### 📷 复现步骤

_No response_

### 🚦 期望结果

_No response_

### 📝 补充信息

_No response_

Labels: released
State: closed
Support apply_chat_template()

### Reminder

- [x] I have read the above rules and searched the existing issues.

### Description

直接使用transformers库里边的apply_chat_template()函数来模板化messages，进行推理或者微调。

现在使用template的方式是用手动预先定义的一些前后缀进行匹配的。
虽然在使用主流模型的时候已经够用，但在许多在这些主流模型上进行微调的模型的模板可能与原始模版有很大区别，甚至会存在更复杂的逻辑，通过在消息前后添加前后缀的方式很有可能难以完成这些逻辑，尤其是在工具调用，或者模板比较复杂的时候。同时手动添加的模板也很难与预先定义的模板完全一致，可能会导致潜在的性能影响。

所以，在模型已有template的时候，直接使用apply_chat_template()模板化历史消息可能更加简洁和高效，免去了繁琐的手动重构，以及更多处理。

Example: LLaMa-3.1-8B when using Tools
在llama-3.1-8B原始的模板中，进行工具调用的时候，本来应该先给出一个ipython的环境信息，再给出当前的时间，同时system message是单独的，而工具调用指令和tools_text则是添加在第一条消息最前面，如下所示：

_

system
_

_**Environment: ipython**_
_Cutting Knowledge Date: December 2023_
_**Today Date: 26 Jul 2024**_

_You are a bot that responds to weather queries.

user
_

_Given the following functions, please respond with a JSON for a function call with its proper arguments that best answers the given prompt._

_**Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.Do not use variables.**_

_**{{Functions}}**_

_Hey, what's the temperature in Paris right now?

assistant
_

_**{"name": "get_current_temperature", "parameters": {"unit": "celsius", "location": "Paris, France"}}
**_

但是在llamafactory里边添加的template就不能添加正确的时间，同时也不能把正确的文本（如工具调用指令和工具信息）放到对应的位置。
这些不正确的解析可能会存在一些潜在的风险，可以通过添加额外的判断来解决这个问题（如下图），但这样还是比较繁琐，难以维护，也可能最终无法和原始的版本匹配，尤其是在多轮调用之后。

![Image](https://github.com/user-attachments/assets/bfd56880-f507-4bea-b32d-c44d75f86508)

### Pull Request

暂无

Labels: solved
State: closed
ChatCompletionCache doesn't work with RedisStore

### What happened?

**Describe the bug**
`RedisStore` fails to cache `ChatCompletionCache` results due to serialization error when trying to store `CreateResult` objects. The error occurs because Redis expects bytes, string, int or float values, but `CreateResult` objects are being passed directly without proper serialization.

**To Reproduce**
```python
import asyncio
import redis
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_ext.models.cache import CHAT_CACHE_VALUE_TYPE, ChatCompletionCache
from autogen_ext.cache_store.redis import RedisStore
from autogen_core.models import UserMessage
import dotenv
dotenv.load_dotenv()

async def reproduce_bug():
    redis_instance = redis.Redis()
    cache_store = RedisStore[CHAT_CACHE_VALUE_TYPE](redis_instance)
    model_client = OpenAIChatCompletionClient(model="gpt-4o-mini")
    cache_client = ChatCompletionCache(model_client, cache_store)
    
    messages = [UserMessage(content="Hello, how are you?", source="user")]
    response = await cache_client.create(messages)  # This fails

asyncio.run(reproduce_bug())
```

**Error output:**
```
❌ Error: Invalid input of type: 'CreateResult'. Convert to a bytes, string, int or float first.
❌ Error type: <class 'redis.exceptions.DataError'>
```

**Expected behavior**
`ChatCompletionCache` with `RedisStore` should work the same way as with `DiskCacheStore`, properly serializing and storing cache results without errors.

**Additional context**
- `DiskCacheStore` works perfectly with the same code

### Which packages was the bug in?

Python Extensions (autogen-ext)

### AutoGen library version.

Python 0.7.1

### Other library version.

_No response_

### Model used

gpt-4o-mini

### Model provider

OpenAI

### Other model provider

_No response_

### Python version

3.12

### .NET version

None

### Operating system

MacOS

Labels: needs-triage
State: closed
[Bug] 使用claude thinking时会出现max token小于thinking budgets

### 📦 Platform

Vercel

### 📦 Deploymenet mode

server db(lobe-chat-database image)

### 📌 Version

latest

### 💻 Operating System

macOS

### 🌐 Browser

Other

### 🐛 Bug Description

当将claude3.7的thinking budgets设置到64k的时候,会出现以下问题,但是我并没有开启单词回复最大用量的限制
```
{
  "error": {
    "type": "invalid_request_error",
    "message": "`max_tokens` must be greater than `thinking.budget_tokens`. Please consult our documentation at https://****/en/docs/build-with-claude/extended-thinking (request id: 20250312105351598489705tKNBl9ln)"
  },
  "endpoint": "https://api.ep****ne.chat/",
  "provider": "anthropic"
}
```

### 📷 Recurrence Steps

_No response_

### 🚦 Expected Behavior

_No response_

### 📝 Additional Information

_No response_

Labels: Inactive, released
State: closed
Redis Store fails to deserialize CreateResult

### What happened?

**Describe the bug**
Redis Store fails to deserialize CreateResult


**To Reproduce**
```python
    |   File "/home/a1-bconstable/autogen/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_base_group_chat.py", line 554, in run_stream
    |     raise RuntimeError(str(message.error))
    | RuntimeError: AssertionError: 
    | Traceback:
    | Traceback (most recent call last):
    | 
    |   File "/home/a1-bconstable/autogen/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_chat_agent_container.py", line 133, in handle_request
    |     async for msg in self._agent.on_messages_stream(self._message_buffer, ctx.cancellation_token):
    | 
    |   File "/home/a1-bconstable/autogen/python/packages/autogen-agentchat/src/autogen_agentchat/agents/_assistant_agent.py", line 953, in on_messages_stream
    |     async for inference_output in self._call_llm(
    | 
    |   File "/home/a1-bconstable/autogen/python/packages/autogen-agentchat/src/autogen_agentchat/agents/_assistant_agent.py", line 1107, in _call_llm
    |     model_result = await model_client.create(
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
    | 
    |   File "/home/a1-bconstable/autogen/python/packages/autogen-ext/src/autogen_ext/models/cache/_chat_completion_cache.py", line 175, in create
    |     assert isinstance(cached_result, CreateResult)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | 
    | AssertionError
    | 
    +------------------------------------
```

**Expected behavior**
Cache should work as expected


### Which packages was the bug in?

Python Extensions (autogen-ext)

### AutoGen library version.

Python 0.7.3

### 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
Redis cache doesn't handle streaming

### What happened?

**Describe the bug**
Redis cache doesn't handle streaming tokens. List is not passed and Redis doesn't support list storing

**To Reproduce**
```
import asyncio
import tempfile

from autogen_core.models import UserMessage, CreateResult
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_ext.models.cache import ChatCompletionCache, CHAT_CACHE_VALUE_TYPE
from autogen_ext.cache_store.diskcache import DiskCacheStore
from diskcache import Cache


async def main():
    with tempfile.TemporaryDirectory() as tmpdirname:
        # Initialize the original client
        openai_model_client = OpenAIChatCompletionClient(model="gpt-4.1-nano")

        # Then initialize the CacheStore, in this case with diskcache.Cache.
        # You can also use redis like:
        from autogen_ext.cache_store.redis import RedisStore
        import redis
        redis_instance = redis.Redis()
        cache_store = RedisStore[CHAT_CACHE_VALUE_TYPE](redis_instance)
        # cache_store = DiskCacheStore[CHAT_CACHE_VALUE_TYPE](Cache(tmpdirname))
        cache_client = ChatCompletionCache(openai_model_client, cache_store)

        response = await cache_client.create([UserMessage(content="Hello, how are you?", source="user")])
        print(response)  # Should print response from OpenAI
        response = await cache_client.create([UserMessage(content="Hello, how are you?", source="user")])
        print(response)  # Should print cached response

        async for chunk in cache_client.create_stream([UserMessage(content="List all countries in Africa", source="user")]):
            if isinstance(chunk, CreateResult):
                print("\n")
                print("Cached: ", chunk.cached) # Should print False
            else:
                print(chunk, end="")

        async for chunk in cache_client.create_stream([UserMessage(content="List all countries in Africa", source="user")]):
            if isinstance(chunk, CreateResult):
                print("\n")
                print("Cached: ", chunk.cached) # Should print True
            else:
                print(chunk, end="")


asyncio.run(main())
```

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

### AutoGen library version.

Python 0.7.3

### 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
[Bug] 调用gemini2.0-pro-exp时不能设置系统提示词

### 📦 Platform

Self hosting Docker

### 📦 Deploymenet mode

server db(lobe-chat-database image)

### 📌 Version

1.71.0

### 💻 Operating System

macOS

### 🌐 Browser

Edge

### 🐛 Bug Description

默认助手和自定义助手包含系统提示词时，对gemini2.0-pro-exp的请求会报错：
```json
{
  "error": {
    "message": "[GoogleGenerativeAI Error]: Error fetching from https://******.com/v1beta/models/gemini-2.0-flash-exp:streamGenerateContent?alt=sse: [400 Bad Request] Developer instruction is not enabled for models/gemini-2.0-flash-exp"
  },
  "provider": "google"
}
```

将提示词调整为空就没事了。只在网上找到一个相关的帖子：<https://linux.do/t/topic/490329/74>

### 📷 Recurrence Steps

_No response_

### 🚦 Expected Behavior

_No response_

### 📝 Additional Information

_No response_

Labels: released, provider:gemini
State: closed