chore: warn when Code Mode lacks model metadata (#29490)

This commit is contained in:
Celia Chen authored and GitHub committed 2026-06-23 01:15:11 +00:00
1 parent b16d2858f5
commit 3310fc8ae5
10 files changed
+275 -12

No files matched your search

+8 -1
View File
@@ -797,7 +797,7 @@ impl Session {
turn_context
}
pub(crate) async fn maybe_emit_unknown_model_warning_for_turn(&self, tc: &TurnContext) {
pub(crate) async fn maybe_emit_model_warnings_for_turn(&self, tc: &TurnContext) {
if tc.model_info.used_fallback_model_metadata {
self.send_event(
tc,
@@ -810,6 +810,13 @@ impl Session {
)
.await;
}
if let Some(message) =
unsupported_code_mode_warning(&tc.model_info, tc.config.features.get())
{
self.send_event(tc, EventMsg::Warning(WarningEvent { message }))
.await;
}
}
pub(crate) async fn new_default_turn(&self) -> Arc<TurnContext> {