[Chore/Refactor] Improve type annotations in models module (#25281)

Signed-off-by: -LAN- <laipz8200@outlook.com>
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
This commit is contained in:
-LAN- 2025-09-08 09:42:27 +08:00 • committed by GitHub
commit 9b8a03b53b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 332 additions and 251 deletions

View file

@ -171,6 +171,8 @@ class AppService:
# get original app model config
if app.mode == AppMode.AGENT_CHAT.value or app.is_agent:
model_config = app.app_model_config
if not model_config:
return app
agent_mode = model_config.agent_mode_dict
# decrypt agent tool parameters if it's secret-input
for tool in agent_mode.get("tools") or []:
@ -205,7 +207,8 @@ class AppService:
pass
# override agent mode
model_config.agent_mode = json.dumps(agent_mode)
if model_config:
model_config.agent_mode = json.dumps(agent_mode)
class ModifiedApp(App):
"""