Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary prompt caching headers for Anthropic service #890

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

danthegoodman1
Copy link
Contributor

@danthegoodman1 danthegoodman1 commented Dec 19, 2024

Please describe the changes in your PR. If it is addressing an issue, please reference that as well.

This hopefully removes the extra headers that cause:

ERR pipecat.services.anthropic:_process_context:257 - AnthropicLLMService#0 exception: Error code: 400 - {'message': 'Cache configuration conflict: Cannot enable prompt caching in message body when it is explicitly disabled in request header'}

This header is no longer needed because prompt caching is out of beta, and does not require a header to use, and I believe it could be the cause of this issue.

I've left all other settings there for backwards compatibility, and should still work without this header.

TBH I'm not sure if it removes this error, but it's the only code involving headers I could find within the pipecat code

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.

1 participant