From 6f5eac06a7223bbe9716d76556ebb071aa01b97d Mon Sep 17 00:00:00 2001 From: Kerry Lu Date: Tue, 3 Nov 2026 14:39:26 -0800 Subject: [PATCH] feat(model-catalog): read deprecation_source, the provider page or feed a row's deprecation_date was read from (#49955) Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- litellm-rust/crates/model-catalog/src/wire/attributes.rs | 4 ++++ tests/unit/test_utils.py | 1 + 2 files changed, 5 insertions(+) diff --git a/litellm-rust/crates/model-catalog/src/wire/attributes.rs b/litellm-rust/crates/model-catalog/src/wire/attributes.rs index d2ba5f609ee..401634f8c62 100644 --- a/litellm-rust/crates/model-catalog/src/wire/attributes.rs +++ b/litellm-rust/crates/model-catalog/src/wire/attributes.rs @@ -95,6 +95,8 @@ attributes! { source: String, /// Model the provider recommends migrating to before `deprecation_date`, as a catalog key when one exists. successor_model: String, + /// URL of the provider page or feed `deprecation_date` was read from. + deprecation_source: String, /// Audio container formats the model can return. supported_audio_formats: Vec, /// OpenAI-style API routes this model can be called through, e.g. /v1/chat/completions. @@ -307,6 +309,8 @@ mod tests { #[case::negative_dbu("input_dbu_cost_per_token", json!(-1), false)] #[case::successor_model("successor_model", json!("gpt-6-luna"), true)] #[case::successor_model_not_a_name("successor_model", json!(["gpt-6-luna"]), false)] + #[case::deprecation_source("deprecation_source", json!("https://developers.openai.com/api/docs/deprecations"), true)] + #[case::deprecation_source_not_a_url_string("deprecation_source", json!(7), false)] #[case::thinking_on_by_default("thinking_on_by_default", json!(true), true)] #[case::thinking_on_by_default_not_a_flag("thinking_on_by_default", json!("yes"), false)] #[case::reasoning_contexts("reasoning_contexts", json!(["reasoning", "non_reasoning"]), true)] diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py index f12280545b7..aeb361d6944 100644 --- a/tests/unit/test_utils.py +++ b/tests/unit/test_utils.py @@ -1027,6 +1027,7 @@ _COST_MAP_ROW_SCHEMA: Final = { "audio_transcription_config": {"type": "string"}, "deprecation_date": {"type": "string"}, "successor_model": {"type": "string"}, + "deprecation_source": {"type": "string"}, "input_cost_per_audio_per_second": {"type": "number"}, "input_cost_per_audio_per_second_above_128k_tokens": {"type": "number"}, "google_maps_grounding_cost_per_query": {"type": "number"},