mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
Fix review feedback: encrypted_content and message ID format
- Put snippet text in encrypted_content so the model can read page content from search results (empty string meant the model only saw titles/URLs) - Strip hyphens from synthetic message ID to match Anthropic's compact alphanumeric format (msg_<hex> not msg_<hex>-<hex>-...) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
5d54adf2de
commit
573b02a35f
1 changed files with 2 additions and 4 deletions
|
|
@ -174,11 +174,9 @@ class WebSearchInterceptionLogger(CustomLogger):
|
|||
"type": "web_search_result",
|
||||
"url": url,
|
||||
"title": title or url,
|
||||
"encrypted_content": "",
|
||||
"encrypted_content": snippet or "",
|
||||
"page_age": None,
|
||||
}
|
||||
if snippet:
|
||||
hit["snippet"] = snippet
|
||||
search_hits.append(hit)
|
||||
|
||||
tool_use_id = f"srvtoolu_{str(uuid.uuid4()).replace('-', '')[:24]}"
|
||||
|
|
@ -204,7 +202,7 @@ class WebSearchInterceptionLogger(CustomLogger):
|
|||
]
|
||||
|
||||
response: Dict[str, Any] = {
|
||||
"id": f"msg_{str(uuid.uuid4())}",
|
||||
"id": f"msg_{str(uuid.uuid4()).replace('-', '')[:20]}",
|
||||
"type": "message",
|
||||
"role": "assistant",
|
||||
"model": model,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue