llama-stack-mirror/llama_stack
Ben Browning a6d8e6831b fix: Responses streaming tools don't concatenate None and str
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.

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 15:46:29 -04:00
..
apis feat: Enable ingestion of precomputed embeddings (#2317) 2025-05-31 04:03:37 -06:00
cli fix: handle None external_providers_dir in build with run arg (#2269) 2025-05-27 09:41:12 +02:00
distribution chore: use starlette built-in Route class (#2267) 2025-05-28 09:53:33 -07:00
models chore: make cprint write to stderr (#2250) 2025-05-24 23:39:57 -07:00
providers fix: Responses streaming tools don't concatenate None and str 2025-05-31 15:46:29 -04:00
strong_typing chore: enable pyupgrade fixes (#1806) 2025-05-01 14:23:50 -07:00
templates feat: support postgresql inference store (#2310) 2025-05-29 14:33:09 -07:00
ui build: Bump version to 0.2.9 2025-05-30 19:43:09 +00:00
__init__.py export LibraryClient 2024-12-13 12:08:00 -08:00
env.py refactor(test): move tools, evals, datasetio, scoring and post training tests (#1401) 2025-03-04 14:53:47 -08:00
log.py chore: make cprint write to stderr (#2250) 2025-05-24 23:39:57 -07:00
schema_utils.py chore: enable pyupgrade fixes (#1806) 2025-05-01 14:23:50 -07:00