chore: patch update tools (#4090)

* patch update tools

* update tool patch

* fallback to generation for legacy tools

* avoid re-parsing source if json schema exists

* fix more tests

* remove asssert

* fix

* update

* update

* update

* Fix tests

---------

Co-authored-by: Matt Zhou <mattzh1314@gmail.com>
This commit is contained in:
Sarah Wooders
2025-08-28 11:34:36 -07:00
committed by GitHub
parent 89932ff90c
commit 58be205098
6 changed files with 279 additions and 569 deletions

View File

@@ -60,6 +60,15 @@ class LettaToolNameConflictError(LettaError):
)
class LettaToolNameSchemaMismatchError(LettaToolCreateError):
"""Error raised when a tool name our source codedoes not match the name in the JSON schema."""
def __init__(self, tool_name: str, json_schema_name: str, source_code: str):
super().__init__(
message=f"Tool name '{tool_name}' does not match the name in the JSON schema '{json_schema_name}' or in the source code `{source_code}`",
)
class LettaConfigurationError(LettaError):
"""Error raised when there are configuration-related issues."""