-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
revert: "fix(provider): restore parameter transparency in core LLM provider adapters" #7023
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -515,7 +515,7 @@ async def text_chat( | |
|
|
||
| model = model or self.get_model() | ||
|
|
||
| payloads = {**kwargs, "messages": new_messages, "model": model} | ||
| payloads = {"messages": new_messages, "model": model} | ||
|
|
||
| # Anthropic has a different way of handling system prompts | ||
| if system_prompt: | ||
|
|
@@ -571,7 +571,7 @@ async def text_chat_stream( | |
|
|
||
| model = model or self.get_model() | ||
|
|
||
| payloads = {**kwargs, "messages": new_messages, "model": model} | ||
| payloads = {"messages": new_messages, "model": model} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to the payloads = {**kwargs, "messages": new_messages, "model": model} |
||
|
|
||
| # Anthropic has a different way of handling system prompts | ||
| if system_prompt: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -757,7 +757,7 @@ async def text_chat( | |
|
|
||
| model = model or self.get_model() | ||
|
|
||
| payloads = {**kwargs, "messages": context_query, "model": model} | ||
| payloads = {"messages": context_query, "model": model} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The removal of payloads = {**kwargs, "messages": context_query, "model": model} |
||
|
|
||
| retry = 10 | ||
| keys = self.api_keys.copy() | ||
|
|
@@ -812,7 +812,7 @@ async def text_chat_stream( | |
|
|
||
| model = model or self.get_model() | ||
|
|
||
| payloads = {**kwargs, "messages": context_query, "model": model} | ||
| payloads = {"messages": context_query, "model": model} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing payloads = {**kwargs, "messages": context_query, "model": model} |
||
|
|
||
| retry = 10 | ||
| keys = self.api_keys.copy() | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -812,7 +812,8 @@ async def _prepare_chat_payload( | |
| context_query = await self._materialize_context_image_parts(context_query) | ||
|
|
||
| model = model or self.get_model() | ||
| payloads = {**kwargs, "messages": context_query, "model": model} | ||
|
|
||
| payloads = {"messages": context_query, "model": model} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The payloads = {**kwargs, "messages": context_query, "model": model} |
||
|
|
||
| self._finally_convert_payload(payloads) | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change removes the
**kwargsfrom thepayloadsdictionary. Thetext_chatmethod is designed to accept arbitrary keyword arguments (**kwargs) to allow for parameter transparency, enabling users to pass provider-specific parameters directly to the underlying API. Removing**kwargshere prevents this flexibility and can lead to a loss of functionality or extensibility for users who rely on passing additional parameters to the Anthropic API. This reverts the intended behavior of restoring parameter transparency.