Skip to content

Conversation

@vedpatwardhan
Copy link
Contributor

Title

Fixed claude tool use without "parameters" in anthropic and bedrock

Relevant issues

Fixes #6012

Type

🐛 Bug Fix

Changes

Added a default value for the "parameters" in the anthropic's _transform_request and the _bedrock_tools_pt

@vercel
Copy link

vercel bot commented Oct 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 2, 2024 11:41am

@krrishdholakia
Copy link
Contributor

Hey @vedpatwardhan does an empty tool block fix the issue?

@krrishdholakia krrishdholakia changed the base branch from main to litellm_dev_10_25_2024 October 2, 2024 19:55
@krrishdholakia krrishdholakia merged commit 7aeb8df into BerriAI:litellm_dev_10_25_2024 Oct 2, 2024
krrishdholakia added a commit that referenced this pull request Oct 3, 2024
* feat(together_ai/completion): handle together ai completion calls

* fix: handle list of int / list of list of int for text completion calls

* fix(utils.py): check if base model in bedrock converse model list

Fixes #6003

* test(test_optional_params.py): add unit tests for bedrock optional param mapping

Fixes #6003

* feat(utils.py): enable passing dummy tool call for anthropic/bedrock calls if tool_use blocks exist

Fixes #5388

* fixed an issue with tool use of claude models with anthropic and bedrock (#6013)

* fix(utils.py): handle empty schema for anthropic/bedrock

Fixes #6012

* fix: fix linting errors

* fix: fix linting errors

* fix: fix linting errors

* fix(proxy_cli.py): fix import route for app + health checks path (#6026)

* (testing): Enable testing us.anthropic.claude-3-haiku-20240307-v1:0. (#6018)

* fix(proxy_cli.py): fix import route for app + health checks gettsburg.wav

Fixes #5999

---------

Co-authored-by: David Manouchehri <[email protected]>

---------

Co-authored-by: Ved Patwardhan <[email protected]>
Co-authored-by: David Manouchehri <[email protected]>
krrishdholakia added a commit that referenced this pull request Oct 3, 2024
* feat(together_ai/completion): handle together ai completion calls

* fix: handle list of int / list of list of int for text completion calls

* fix(utils.py): check if base model in bedrock converse model list

Fixes #6003

* test(test_optional_params.py): add unit tests for bedrock optional param mapping

Fixes #6003

* feat(utils.py): enable passing dummy tool call for anthropic/bedrock calls if tool_use blocks exist

Fixes #5388

* fixed an issue with tool use of claude models with anthropic and bedrock (#6013)

* fix(utils.py): handle empty schema for anthropic/bedrock

Fixes #6012

* fix: fix linting errors

* fix: fix linting errors

* fix: fix linting errors

* fix(proxy_cli.py): fix import route for app + health checks path (#6026)

* (testing): Enable testing us.anthropic.claude-3-haiku-20240307-v1:0. (#6018)

* fix(proxy_cli.py): fix import route for app + health checks gettsburg.wav

Fixes #5999

---------

Co-authored-by: David Manouchehri <[email protected]>

---------

Co-authored-by: Ved Patwardhan <[email protected]>
Co-authored-by: David Manouchehri <[email protected]>
krrishdholakia added a commit that referenced this pull request Oct 3, 2024
* feat(together_ai/completion): handle together ai completion calls

* fix: handle list of int / list of list of int for text completion calls

* fix(utils.py): check if base model in bedrock converse model list

Fixes #6003

* test(test_optional_params.py): add unit tests for bedrock optional param mapping

Fixes #6003

* feat(utils.py): enable passing dummy tool call for anthropic/bedrock calls if tool_use blocks exist

Fixes #5388

* fixed an issue with tool use of claude models with anthropic and bedrock (#6013)

* fix(utils.py): handle empty schema for anthropic/bedrock

Fixes #6012

* fix: fix linting errors

* fix: fix linting errors

* fix: fix linting errors

* fix(proxy_cli.py): fix import route for app + health checks path (#6026)

* (testing): Enable testing us.anthropic.claude-3-haiku-20240307-v1:0. (#6018)

* fix(proxy_cli.py): fix import route for app + health checks gettsburg.wav

Fixes #5999

---------

Co-authored-by: David Manouchehri <[email protected]>

---------

Co-authored-by: Ved Patwardhan <[email protected]>
Co-authored-by: David Manouchehri <[email protected]>
krrishdholakia added a commit that referenced this pull request Oct 3, 2024
* (azure): Enable stream_options for Azure OpenAI. (#6024)

* LiteLLM Minor Fixes & Improvements (10/02/2024)  (#6023)

* feat(together_ai/completion): handle together ai completion calls

* fix: handle list of int / list of list of int for text completion calls

* fix(utils.py): check if base model in bedrock converse model list

Fixes #6003

* test(test_optional_params.py): add unit tests for bedrock optional param mapping

Fixes #6003

* feat(utils.py): enable passing dummy tool call for anthropic/bedrock calls if tool_use blocks exist

Fixes #5388

* fixed an issue with tool use of claude models with anthropic and bedrock (#6013)

* fix(utils.py): handle empty schema for anthropic/bedrock

Fixes #6012

* fix: fix linting errors

* fix: fix linting errors

* fix: fix linting errors

* fix(proxy_cli.py): fix import route for app + health checks path (#6026)

* (testing): Enable testing us.anthropic.claude-3-haiku-20240307-v1:0. (#6018)

* fix(proxy_cli.py): fix import route for app + health checks gettsburg.wav

Fixes #5999

---------

Co-authored-by: David Manouchehri <[email protected]>

---------

Co-authored-by: Ved Patwardhan <[email protected]>
Co-authored-by: David Manouchehri <[email protected]>

---------

Co-authored-by: David Manouchehri <[email protected]>
Co-authored-by: Ved Patwardhan <[email protected]>
@vedpatwardhan
Copy link
Contributor Author

Hey @vedpatwardhan does an empty tool block fix the issue?

Yep, thanks for merging the changes 👍

krrishdholakia added a commit that referenced this pull request Oct 3, 2024
* fix(factory.py): bedrock:  merge consecutive tool + user messages

Fixes #6007

* LiteLLM Minor Fixes & Improvements (10/02/2024)  (#6023)

* feat(together_ai/completion): handle together ai completion calls

* fix: handle list of int / list of list of int for text completion calls

* fix(utils.py): check if base model in bedrock converse model list

Fixes #6003

* test(test_optional_params.py): add unit tests for bedrock optional param mapping

Fixes #6003

* feat(utils.py): enable passing dummy tool call for anthropic/bedrock calls if tool_use blocks exist

Fixes #5388

* fixed an issue with tool use of claude models with anthropic and bedrock (#6013)

* fix(utils.py): handle empty schema for anthropic/bedrock

Fixes #6012

* fix: fix linting errors

* fix: fix linting errors

* fix: fix linting errors

* fix(proxy_cli.py): fix import route for app + health checks path (#6026)

* (testing): Enable testing us.anthropic.claude-3-haiku-20240307-v1:0. (#6018)

* fix(proxy_cli.py): fix import route for app + health checks gettsburg.wav

Fixes #5999

---------

Co-authored-by: David Manouchehri <[email protected]>

---------

Co-authored-by: Ved Patwardhan <[email protected]>
Co-authored-by: David Manouchehri <[email protected]>

* fix(factory.py): correctly handle content in tool block

---------

Co-authored-by: Ved Patwardhan <[email protected]>
Co-authored-by: David Manouchehri <[email protected]>
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.

[Bug]: claude models tool use without "parameters" fails with anthropic and bedrock

2 participants