Skip to content

test support: add function_call cassettes for vLLM response mode #60

Merged
franciscojavierarceo merged 3 commits into
vllm-project:mainfrom
EmbeddedLLM:function-call-cassettes
Jun 17, 2026
Merged

test support: add function_call cassettes for vLLM response mode #60
franciscojavierarceo merged 3 commits into
vllm-project:mainfrom
EmbeddedLLM:function-call-cassettes

Conversation

@maralbahari

Copy link
Copy Markdown
Collaborator

Summary

  • Adds --tools and --tool-choice options to record_cassette.py to inject tool definitions and tool_choice into requests
  • Adds tool_calls/tools.json with 8 tool definitions (get_weather, get_time, get_stock_price, search_web, translate_text, calculate, send_email, read_file)
  • Adds record_tool_call_cassettes.sh to record 8 cassettes covering all four tool_choice modes (auto, none, required, named) × streaming and non-streaming

This recorded cassettes in this PR assist to test #59

How to Record

1. Start vLLM with tool-call support:

vllm serve Qwen/Qwen3-30B-A3B-FP8 \
    --tool-call-parser hermes \
    --enable-auto-tool-choice \
    --port 5050

2. Run the cassette recorder:

VLLM_URL=http://0.0.0.0:5050 MODEL=Qwen/Qwen3-30B-A3B-FP8 bash tests/cassettes/record_tool_call_cassettes.sh

Signed-off-by: maral <maralbahari.98@gmail.com>
@maralbahari maralbahari changed the title test support: add cassettes from vLLM upstream for different function_call test support: add function_call cassettes for vLLM response mode Jun 17, 2026
@maralbahari

Copy link
Copy Markdown
Collaborator Author

@ashwing I added a readme file, a guide how to use the python cassettes recoder and how it works. @franciscojavierarceo I believe this could help you to collect cassettes for ogx file_search PR ? since now there is tool call options passed to vLLM responses to record function_call output this PR.

@franciscojavierarceo franciscojavierarceo merged commit 266167f into vllm-project:main Jun 17, 2026
3 checks passed
ashwing added a commit to ashwing/agentic-api that referenced this pull request Jun 17, 2026
…lator

Add 10 new cassette tests covering:
- All tool_choice modes streaming (auto, required, named, none)
- All tool_choice modes non-streaming (validates from_json path)
- Reasoning streaming (Qwen3 and GPT-oss)

Validates the accumulator correctly handles real multi-tool streaming
responses and non-streaming JSON responses from multiple model families.

Signed-off-by: Ashwin Giridharan <girida@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants