You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(BA-5528): apply review feedback for chat CLI
Address review comments on PR #11344:
- chat.py:
- Drop the auto-clear of the cached API key on inference 401/403 — it
was deleting user-supplied config out from under them. Just raise
the error and ask the user to re-register.
- Use print() instead of sys.stdout.write() for the response payload.
- chat_config.py:
- Remove --no-token; clearing is the dedicated chat-config clear
command's job. Resolved-key handling collapses to a single expression.
- Use print() instead of click.echo() for status output.
- Parse the inference endpoint's /v1/models response with a typed
Pydantic model (_ServedModelsResponse) instead of manual dict.get
walking.
- _print_entry now delegates the entry portion to
DeploymentChatCacheEntry.format_summary() so the per-entry fields
are owned by the cache type.
- deployment_chat_cache.py / deployment_chat_config.py:
- Drop schema_version as a Pydantic field on the wrapper model. The
version is metadata, not data — emit it manually around model_dump
in save_*, and check it manually in load_* before validating
individual records.
- DeploymentChatCacheEntry gains a format_summary() method returning the
endpoint/default_model/last_synced_at lines so consumers don't
duplicate that formatting.
0 commit comments