refactor: normalize deepseek model names to deepseek-chat

This commit is contained in:
Paul Gauthier (aider) 2025-01-10 15:51:53 -08:00
parent 6e8efe22aa
commit fcc499e401

View file

@ -19,9 +19,11 @@ def collect_model_stats(n_lines=1000):
properties = event["properties"] properties = event["properties"]
main_model = properties.get("main_model") main_model = properties.get("main_model")
# combine deepseek/deepseek-coder into ...-chat ai!
total_tokens = properties.get("total_tokens", 0) total_tokens = properties.get("total_tokens", 0)
if main_model: if main_model:
# Normalize deepseek model names
if "deepseek" in main_model.lower():
main_model = "deepseek-chat"
model_stats[main_model] += total_tokens model_stats[main_model] += total_tokens
except json.JSONDecodeError: except json.JSONDecodeError:
continue continue