llama-stack/llama_stack/providers/inline/agents/meta_reference
Ben Browning 277f8690ef
fix: Responses streaming tools don't concatenate None and str (#2326)
# What does this PR do?

This adds a check to ensure we don't attempt to concatenate `None + str`
or `str + None` when building up our arguments for streaming tool calls
in the Responses API.

## Test Plan

All existing tests pass with this change.

Unit tests:

```
python -m pytest -s -v \
  tests/unit/providers/agents/meta_reference/test_openai_responses.py
```

Integration tests:

```
llama stack run llama_stack/templates/together/run.yaml

LLAMA_STACK_CONFIG=http://localhost:8321 \
python -m pytest -s -v \
  tests/integration/agents/test_openai_responses.py \
  --text-model meta-llama/Llama-4-Scout-17B-16E-Instruct
```

Verification tests:

```
llama stack run llama_stack/templates/together/run.yaml

pytest -s -v 'tests/verifications/openai_api/test_responses.py' \
  --base-url=http://localhost:8321/v1/openai/v1 \
  --model meta-llama/Llama-4-Scout-17B-16E-Instruct
```

Additionally, the manual example using Codex CLI from #2325 now succeeds
instead of throwing a 500 error.

Closes #2325

Signed-off-by: Ben Browning <bbrownin@redhat.com>
2025-05-31 18:24:04 -07:00
..
__init__.py chore: enable pyupgrade fixes (#1806) 2025-05-01 14:23:50 -07:00
agent_instance.py feat: implementation for agent/session list and describe (#1606) 2025-05-07 14:49:23 +02:00
agents.py feat: add responses input items api (#2239) 2025-05-24 07:05:53 -07:00
config.py feat: add list responses API (#2233) 2025-05-23 13:16:48 -07:00
openai_responses.py fix: Responses streaming tools don't concatenate None and str (#2326) 2025-05-31 18:24:04 -07:00
persistence.py feat: implementation for agent/session list and describe (#1606) 2025-05-07 14:49:23 +02:00
safety.py chore: enable pyupgrade fixes (#1806) 2025-05-01 14:23:50 -07:00