alfin06/swegent-issues-filtered huggingface dataset:
Unable to call the API locally

**Describe the bug**
I can now use docker-compose to launch langflow locally.
Currently, I can configure the following flow to do the build.
<img width="1440" alt="image" src="https://github.com/logspace-ai/langflow/assets/51770462/d2e0cc16-c683-4351-aeec-e459e8c0315f">

Also, we were able to absorb conversations with AI.
<img width="1440" alt="image-1" src="https://github.com/logspace-ai/langflow/assets/51770462/7d48819b-5892-4093-969a-65b5bb3692b2">

We are currently considering using this from an API rather than a GUI.
Referring to the commands shown in [the documentation](https://docs.langflow.org/guidelines/api) and GUI, I executed the following command.

```bash
curl -X POST \
  http://localhost:3000/api/v1/process/32f1077c-70dc-49c0-8006-0c64ef8b02e6 \
  -H 'Content-Type: application/json'\
  -H 'x-api-key: sk-elo0IAfBfiMQkdpOZrw_6Hgxd1Pdo2zg22mD4BhCqIk'\
  -d '{"inputs": {"input":""}, "tweaks": {
  "AmazonBedrock-1rYBo": {},
  "ConversationChain-FFwTG": {}
}}'
```

The response is as follows.

```
{"detail":"Error: One input key expected got ['repr', 'input']"}
```

**Browser and Version**
 - Browser chrome
 - Version v0.5.5

**To Reproduce**
Steps to reproduce the behavior:
1. Build a flow
2. Generate an API key
3. Invoke curl command
4. See error



Labels: bug
State: closed
Fix flaky read_many_files.test.ts: should be able to read multiple files

**Test File**: `integration-tests/read_many_files.test.ts`
**Test Name**: `should be able to read multiple files`
**Testing Behavior**: Tests the CLI's ability to read content from multiple files.

**Status**:
- Skipped: true
- Needs Model Call: true
- Currently Has Model Call: true

**Recommendation**:
Verify that either `read_many_files` was called OR that multiple `read_file` calls were made, and then use `validateModelOutput` to loosely check for the file contents in the final response, rather than a strict assertion.

State: closed
Refactor: Migrate console.error in tool-registry.ts to coreEvents

## Context
We are unifying our error reporting and user feedback. This file, `packages/core/src/tools/tool-registry.ts`, handles tool discovery.

## Task
Review the `console.error` calls within the `discoverAndRegisterToolsFromCommand` function.
- These are triggered when the user-configured tool discovery command fails. This is a true error that the user needs to be aware of so they can correct their configuration.
- Please migrate the `console.error` calls to use the event emitter: `coreEvents.emitFeedback('error', 'Tool discovery command failed.', errorObject)`. This will surface the error to the user in the chat history and log it appropriately.

Reference PR #11803 for examples.

Parent Issue: #10761

State: closed
Refactor: Logging review for console.error in loopDetectionService.ts

## Context
We are standardizing our logging and error handling. This file, `packages/core/src/services/loopDetectionService.ts`, contains logic to detect if the AI is in a repetitive loop.

## Task
Review the `console.error` call within the `catch` block of the `checkForLoopWithLLM` method. This log is triggered when the LLM call used for loop detection itself fails.

### Recommendation
Our analysis suggests this is a non-critical failure of a background, internal diagnostic. The service gracefully handles this by assuming no loop is present and continuing. The user is not affected.

We recommend migrating the `console.error` call to `debugLogger.warn`.

**Please evaluate this recommendation and course-correct as you see fit.** The goal is to ensure the log level matches the error's severity and context.

Reference PR #11803 for examples.

Parent Issue: #10761

State: closed
Refactor: Logging review for console.error in usePromptCompletion.ts

## Context
We are standardizing our logging and error handling. This file, `packages/cli/src/ui/hooks/usePromptCompletion.ts`, is a hook for prompt completion.

## Task
Review the `console.error` call within the `catch` block of the `generatePromptSuggestions` function. This log is triggered when the LLM call for a prompt completion fails.

### Recommendation
Our analysis suggests this is a non-critical, handled error. The hook fails gracefully by clearing the completion text, and the user is not blocked.

We recommend migrating the `console.error` call to `debugLogger.warn`.

**Please evaluate this recommendation and course-correct as you see fit.** The goal is to ensure the log level matches the error's severity and context.

Reference PR #11803 for examples.

Parent Issue: #10761

State: closed
CLI shows `gemini-2.5-pro (x% context left)` even after a flash fallback

### What happened?

<img width="2472" height="572" alt="Image" src="https://github.com/user-attachments/assets/9ab30c0a-5ce9-41dc-9835-ab44e1aac9fd" />

### What did you expect to happen?

The bottom bar text should say the current active model name. 

### Client information

Built from HEAD

### Login information

Google Account

### Anything else we need to know?

However it isn't clear to me what the intent of that message is. For pro model it seems to represent the max context size a request can have, and the context growth as users interact with the CLI. Does the same context limitation apply for the Flash model? Is it the same limit?

State: closed
[FEATURE]  Integration of Portkey with CrewAI

### Feature Area

Documentation

### Is your feature request related to a an existing bug? Please link it here.

Integrate Portkey with CrewAI. Agent Observability and Monitoring with Portkey





### Describe the solution you'd like

Key Additions:
**Real-time Guardrails:** Enforce agent behavior with real-time checks on inputs and outputs
**Multi-LLM Integration:** Effortlessly route your requests to over 200 LLMs, ensuring flexibility and scalability.
**Enhanced Reliability:** Implement failovers, retries, and load balancing to make each LLM call more robust.
**Advanced Metrics:** Gain insights with full-stack tracing, and monitor cost, tokens, and latency.


### Describe alternatives you've considered

_No response_

### Additional context

_No response_

### Willingness to Contribute

Yes, I'd be happy to submit a pull request

Labels: feature-request, no-issue-activity
State: closed
[Bug] Tool call in group chat

Discovered by @yoadsn: There will be agents who are neither a proposer nor an executor of a tool, and they will raise an error when performing oai inference when seeing messages with tool flags.

Proposal: For agents who are neither the suggester nor the executor of a function/tool, the function/tool call/response message can be processed into plain text before sending to them by the group chat manager. Same for the `groupchat`'s messages which will be used to perform speaker selection.

_Originally posted by @sonichi in https://github.com/microsoft/autogen/issues/960#issuecomment-1890815045_


Labels: group chat/teams, tool-usage
State: closed
`subprocess` and `sys` are needed by `_check_pkg`

**Describe the bug**
The generic LLM provider tries to dynamically `pip install` packages that are not currently available, but the routine that does this does not have subprocess or sys imported, so the code throws at runtime. 

**To Reproduce**
Build a container for the researcher and use AWS Bedrock or any other provider which is not in the requirements.txt (`langchain-aws` in the case of Bedrock).

**How to fix this bug**
Stick this at the top of `llm_provider/generic/base.py`

```py
import subprocess
import sys
```



State: closed
[Bug]: Unsupported field `name` in tool response

### Describe the bug

The message generated a user proxy after tool execution contains the field `"name"`, but it should not according to the OpenAPI specs (https://github.com/openai/openai-openapi/blob/f4a2833d00e92c4b1cb531d437da88a03de997d8/openapi.yaml#L5478C5-L5495):

```yaml
ChatCompletionRequestToolMessage:
  type: object
  title: Tool message
  properties:
    role:
      type: string
      enum: ["tool"]
      description: The role of the messages author, in this case `tool`.
    content:
      type: string
      description: The contents of the tool message.
    tool_call_id:
      type: string
      description: Tool call that this message is responding to.
  required:
    - role
    - content
    - tool_call_id
```
Example of the output of user proxy after execution:
```
{
  ‘tool_call_id’: ‘call_1YWzmz9ADEH5aHeSyjBuvO5k’,
  ‘role’: ‘tool’,
  ‘name’: ‘currency_calculator’,
  ‘content’: ‘{“currency”: “USD”, “amount”: 123.45300000000002}’
}
```

This causes problems with open-source LLMs (see e.g.https://levelup.gitconnected.com/do-you-know-function-calling-is-also-available-for-open-source-llms-in-autogen-b1d920f48b9b)

### Steps to reproduce

_No response_

### Expected Behavior

_No response_

### Screenshots and logs

_No response_

### Additional Information

_No response_

State: closed
[Bug]: issubclass checking error in dependency_injection

### Describe the bug

Got the following error when testing the deepresearch agent,

```python
Traceback (most recent call last):
  File "/Users/qingyunwu/Documents/github/ag2ai/ag2/research.py", line 52, in <module>
    agent = DeepResearchAgent(
  File "/Users/qingyunwu/Documents/github/ag2ai/ag2/autogen/agents/experimental/deep_research/deep_research.py", line 44, in __init__
    self.tool = DeepResearchTool(
  File "/Users/qingyunwu/Documents/github/ag2ai/ag2/autogen/tools/experimental/deep_research/deep_research.py", line 157, in __init__
    super().__init__(
  File "/Users/qingyunwu/Documents/github/ag2ai/ag2/autogen/tools/tool.py", line 51, in __init__
    self._chat_context_param_names = get_context_params(func_or_tool, subclass=ChatContext)
  File "/Users/qingyunwu/Documents/github/ag2ai/ag2/autogen/tools/dependency_injection.py", line 116, in get_context_params
    return [p.name for p in sig.parameters.values() if _is_context_param(p, subclass=subclass)]
  File "/Users/qingyunwu/Documents/github/ag2ai/ag2/autogen/tools/dependency_injection.py", line 116, in <listcomp>
    return [p.name for p in sig.parameters.values() if _is_context_param(p, subclass=subclass)]
  File "/Users/qingyunwu/Documents/github/ag2ai/ag2/autogen/tools/dependency_injection.py", line 137, in _is_context_param
    return isinstance(param_annotation, type) and issubclass(param_annotation, subclass)
  File "/Users/qingyunwu/miniconda3/envs/ag2/lib/python3.10/abc.py", line 123, in __subclasscheck__
    return _abc_subclasscheck(cls, subclass)
TypeError: issubclass() arg 1 must be a class
```

I hacked a workaround by replacing[ this line of code](https://github.com/ag2ai/ag2/blob/main/autogen/tools/dependency_injection.py#L124) with the following, but not sure if this is the right approach.


```python
if not isinstance(param.annotation, type):
        return False
        
try:
    result = issubclass(param, subclass)
    return result
except Exception as e:
    return False
```


### Steps to reproduce

_No response_

### Model Used

_No response_

### Expected Behavior

_No response_

### Screenshots and logs

_No response_

### Additional Information

_No response_

Labels: bug
State: closed
write_todo tool is seeing MALFORMED_FUNCTION_CALL errors

This has resulted in a regression because we exit after a malformed function call error. This is because the json output by the model is incorrect. Update the output format such that we see a lower number of these errors.


State: closed
[Feature Request]:  Add class for llm config called LLMConfig

### Is your feature request related to a problem? Please describe.

This is to implement the `LLMConfig` suggested as part of RFC - https://github.com/ag2ai/ag2/pull/1035

```python
# Set up LLMConfig as a context manager for agent configuration
llm_config = LLMConfig({"config_list": [{"api_key": "your-api-key", "model": "gpt-4o-mini"}]})

# Define tools for the agents
@tool(description="Search Wikipedia for the given query.")
def search_wikipedia(query: str) -> str:
    return "Leonardo da Vinci was an Italian polymath."

@tool(description="Send the answer to the user.")
def send_answer(answer: str) -> str:
    return f"Answer sent: {answer}"

async def run_agents_and_process_events():
    with llm_config:
        alice = ConversableAgent(system_message="You are a helpful assistant.")
        bob = ConversableAgent(system_message="You are a fact-checker.")

    alice.add_tool(search_wikipedia)
    bob.add_tool(send_answer)

    response = await a_run(alice, bob, message="Who is Leonardo da Vinci?")
    return response
```

### Describe the solution you'd like

_No response_

### Additional context

_No response_

Labels: enhancement
State: closed
[Issue]: Unable to cache `ParsedChatCompletion` Objects in OpenAIWrapper

### Describe the issue

With the introduction of the new structured output, the OpenAI client calls the `client.beta.chat.completions.parse` method, which returns [`ParsedChatCompletion`](https://github.com/openai/openai-python/blob/main/src/openai/types/chat/parsed_chat_completion.py#L35) objects. These objects cannot be pickled, which poses a problem for caching responses. 

### Steps to reproduce

_No response_

### Screenshots and logs

_No response_

### Additional Information

We could convert the `ParsedChatCompletion` objects into [`ChatCompletion`](https://github.com/openai/openai-python/blob/6974a981aec1814b5abba429a8ea21be9ac58538/src/openai/types/chat/chat_completion.py#L43) objects before storing them. The `ChatCompletion` objects are picklable superclass of `ParsedChatCompletion` which contain all the fields that we use from the response in the client, so this approach would enable seamless caching while maintaining the structured output's benefits.

State: closed
Add package version to import utils

Also, can we check the openai version in the import_openai attempt? There's an old openai version available which passes that import attempt but should be considered as a failure of import instead [ref](https://discord.com/channels/1153072414184452236/1248044812956074075/1349149229733515357).

State: closed
[Feature Request]: Add termination messages

### Is your feature request related to a problem? Please describe.

When a workflow terminates it can be difficult to know why as it just exits. It would be useful to add termination messages for things like:
- Reached Maximum Turns
- Reached Maximum Rounds
- Maximum Auto-replies
- is_termination_keyword condition met

This would help ensure that the developer knows why it terminated (as many times it has terminated based on these things but it hasn't been obvious).

Labels: enhancement
State: closed
[Bug]: Ollama Client failing

### Describe the bug

Passing in the response_format to the OllamaClient is causing it to fail. This means we can't use Ollama.

```
from autogen import ConversableAgent

llm_config = {"model": "gemma3:12b", "api_type": "ollama", "client_host": "http://host.docker.internal:11434", "cache_seed": None}

ollama_agent = ConversableAgent(
    name="ollama_agent",
    llm_config=llm_config,
    system_message="You are a helpful AI assistant.",
)

human = ConversableAgent(
    name="human",
    human_input_mode="ALWAYS",
)

result = human.initiate_chat(
    recipient=ollama_agent,
    message="Give me a sentence about AI.",
)
```
Error:
```
  File "/app/ag2/autogen/oai/client.py", line 884, in _register_default_client
    client = OllamaClient(response_format=response_format, **openai_config)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: OllamaClient.__init__() got an unexpected keyword argument 'response_format'
```

I believe it's because there are no **kwargs on the __init__ in OllamaClient:
```
def __init__(self):
```

`test_ollama.py` doesn't have any tests of OllamaClient with parameters.

Labels: bug
State: closed
[Bug]: `code_execution_config` in `ReasoningAgent`

### Describe the bug

The check here:
`if self._code_execution_config is not None:`

is not valid, as from `ConversableAgent`'s constructor:
`code_execution_config: Union[dict[str, Any], Literal[False]] = False`

so it defaults to `False` and not `None`.

### Steps to reproduce

_No response_

### Model Used

_No response_

### Expected Behavior

_No response_

### Screenshots and logs

_No response_

### Additional Information

_No response_

Labels: bug
State: closed
[BUG] Unable to directly invoke tools with a hyphen with the tool name

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

0.1.2

### Python Version

3.12

### Operating System

macos

### Installation Method

pip

### Steps to Reproduce

Add a tool with a hyphen in the name

```
from strands import Agent, tool

@tool(name="example-tool")
def example_tool():
    return "done"

agent = Agent(
    tools=[example_tool],
    model=ollama_model,
)
agent.tool.example_tool() # doesn't work to call the function
agent.tool.example-tool() # not valid syntax
```

Notice that there's no way to directly invoke that tool

### Expected Behavior

There should be a way to invoke a tool with a hyphen in the name

### Actual Behavior

There is no way

### Additional Context

_No response_

### Possible Solution

Allow subscripting of any name by implementing `__getitem__` for looking up tools.  That would enable this format:

```
agent.tool["example-tool"]() 
```

Alternatively, we could normalize the name of tools with dashes to underscores:

```
agent.tool.example_tool() 
```

The only downside there would be if there are two tools with similar names, but that's probably rare enough to not be a significant issue.

### Related Issues

#54

Labels: bug
State: closed
[Feature Request]: Batch Grading for ReasoningAgent beam search.

### Is your feature request related to a problem? Please describe.

By default, node grading is performed one at a time. While this approach is often sufficient, certain applications would benefit from a batched grading approach on each beam expansion. In other words, instead of grading all nodes across the entire search in a single pass, we can group each beam's newly expanded nodes into a single batch for grading. This yields:

1. **Context-aware evaluation**: Within a single beam iteration, the grader can compare and contrast multiple node expansions at once.
2. **Improved efficiency**: Combining multiple evaluations into one request per beam iteration can reduce the total number of LLM calls.

### Describe the solution you'd like

_No response_

### Additional context

_No response_

Labels: enhancement, reasoning-agent
State: closed
[Feature Request]: Implement Wikipedia Agent

### Is your feature request related to a problem? Please describe.

Encapsulate wikipedia tools in an agent that encapsulates various Wikipedia tools and determines which tool(s) to use based on the problem context.

Wikipedia Tools (#1367):
- WikipediaQueryRunTool: Returns summary of a list of pages returned from search query
- WikipediaPageLoadTool: Returns full text of a list of pages returned from search query


### Describe the solution you'd like

### Additional context

_No response_

Labels: enhancement
State: closed
[Feature Request]: Support base_url for Anthropic Provider

### Is your feature request related to a problem? Please describe.

It's essential to set base_url for both Anthropic and Anthropic Bedrock when we need to proxy the api calls.

The current version of AnthropicClient ignored base_url parameter from config list.

### Describe the solution you'd like

_No response_

### Additional context

_No response_

Labels: enhancement
State: closed
change agent sdk api to include emojiChar for completion group

right now agent can only return `string[]` for completions in CompletionGroup but need emojiChar and eventually other items such as colors and descriptions

State: closed
[BUG] : CrewAI Doesn't seem to support VertexAI embedding models.

### Description

I need to use memory feature of CrewAI to make sure that my chatBOT uses the recent interactions to answer the follow up questions. Currently, we are using GCP VertexAI platform. I found following code in the documentation link(https://docs.crewai.com/concepts/memory) to implement the memory but this code is failing because CrewAI doesn't have any 'embedding_functions'. can you point me to the right documentation or help me solve this issue?

from crewai import Crew, Agent, Task, Process

my_crew = Crew(
    agents=[...],
    tasks=[...],
    process=Process.sequential,
    memory=True,
    verbose=True,
    embedder=embedding_functions.GoogleVertexEmbeddingFunction(
        project_id="YOUR_PROJECT_ID",
        region="YOUR_REGION",
        api_key="YOUR_API_KEY",
        model_name="textembedding-gecko"
    )
)


### Steps to Reproduce

Create a crew using following code

from crewai import Crew, Agent, Task, Process

my_crew = Crew(
    agents=[...],
    tasks=[...],
    process=Process.sequential,
    memory=True,
    verbose=True,
    embedder=embedding_functions.GoogleVertexEmbeddingFunction(
        project_id="YOUR_PROJECT_ID",
        region="YOUR_REGION",
        api_key="YOUR_API_KEY",
        model_name="textembedding-gecko"
    )
)

### Expected behavior

Code provided in the documentation should be able to create memory using VertexAI embedding model

### Screenshots/Code snippets

from crewai import Crew, Agent, Task, Process

my_crew = Crew(
    agents=[...],
    tasks=[...],
    process=Process.sequential,
    memory=True,
    verbose=True,
    embedder=embedding_functions.GoogleVertexEmbeddingFunction(
        project_id="YOUR_PROJECT_ID",
        region="YOUR_REGION",
        api_key="YOUR_API_KEY",
        model_name="textembedding-gecko"
    )
)

### Operating System

Ubuntu 20.04

### Python Version

3.10

### crewAI Version

latest

### crewAI Tools Version

NA

### Virtual Environment

Venv

### Evidence

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[3], line 1
----> 1 from crewai.embedding_functions import GoogleVertexEmbeddingFunction

ModuleNotFoundError: No module named 'crewai.embedding_functions'

### Possible Solution

NOne

### Additional context

None

Labels: bug
State: closed
TypeError [ERR_INVALID_STATE]: Invalid state: The ReadableStream is locked

### Description

All the code is based on the Vercel IA SDK documentation, I'm using the `createGoogleGenerativeAI` provider instance with my API key and everything is fine, but whenever I need a return on the client side with `new StreamingTextResponse(result.toAIStream( ))`  return this error:
![image](https://github.com/vercel/ai/assets/80254945/05d5fbb3-9ef7-4b42-a914-f5dcfe3a0905)
my AI response is not compromised but the available stream is locked...

### Code example

```typescript
import { StreamingTextResponse, streamText, StreamData } from "ai";

import { NextRequest } from "next/server";

import { createGoogleGenerativeAI } from "@ai-sdk/google";

export const dynamic = "force-dynamic";

export const POST = async (req: NextRequest) => {
  const data = await req.json();
 

  const google = createGoogleGenerativeAI({
    apiKey: process.env.GOOGLE_API_KEY!,
    // custom settings
  });

  const model = google("models/gemini-1.5-pro-latest");

  const result = await streamText({
    model,
    prompt: "Hello , you you doing? "
    seed: 5,
  });

  let message = "";

  for await (const item of result.textStream) {
    console.log(item);
    message = item;
  }

  if (!result) {
    console.log("error !!! ");
  }

  return new StreamingTextResponse(result.toAIStream());
};

``` 

### Additional context

![image](https://github.com/vercel/ai/assets/80254945/da497411-d86b-436f-851d-12458217f792)


State: closed