Skip to content

Conversation

@hardikjshah
Copy link
Contributor

What does this PR do?

Currently, ToolCall.arguments is a Dict[str, RecursiveType]. However, on the client SDK side -- the RecursiveType gets deserialized into a number ( both int and float get collapsed ) and hence when params are int they get converted to float which might break client side tools that might be doing type checking.

Closes: https://github.com/meta-llama/llama-stack/issues/1683

Test Plan

Stainless changes -- llamastack/llama-stack-client-python#204

pytest -s -v --stack-config=fireworks tests/integration/agents/test_agents.py  --text-model meta-llama/Llama-3.1-8B-Instruct

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Mar 18, 2025
call_id: str
tool_name: Union[BuiltinTool, str]
arguments: Dict[str, RecursiveType]
arguments: Union[str, Dict[str, RecursiveType]]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a comment here explaining why there is a Union[str, ...] and how the deprecation process will happen?

@ashwinb
Copy link
Contributor

ashwinb commented Mar 19, 2025

Generally looks good. Can you add an integration test case for this maybe?

@yanxi0830
Copy link
Contributor

We can schedule a CI with this commit & llama-stack-client-python commit

image

@hardikjshah
Copy link
Contributor Author

https://github.com/meta-llama/llama-stack-ops/actions/runs/13952670908

Ran the job with main branch of python client and worked fine

@hardikjshah hardikjshah merged commit 65ca85b into llamastack:main Mar 19, 2025
14 checks passed
franciscojavierarceo pushed a commit to franciscojavierarceo/llama-stack that referenced this pull request Mar 22, 2025
… be decoded on client side (llamastack#1685)

### What does this PR do?

Currently, `ToolCall.arguments` is a `Dict[str, RecursiveType]`.
However, on the client SDK side -- the `RecursiveType` gets deserialized
into a number ( both int and float get collapsed ) and hence when params
are `int` they get converted to float which might break client side
tools that might be doing type checking.

Closes: https://github.com/meta-llama/llama-stack/issues/1683

### Test Plan
Stainless changes --
llamastack/llama-stack-client-python#204
```
pytest -s -v --stack-config=fireworks tests/integration/agents/test_agents.py  --text-model meta-llama/Llama-3.1-8B-Instruct
```
mattf added a commit to langchain-ai/langchain-llama-stack that referenced this pull request Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants