Skip to content

Conversation

@SongChiYoung
Copy link
Contributor

Why are these changes needed?

This PR improves fallback safety when an invalid model_family is supplied to get_transformer(). Previously, if a user passed an arbitrary or incorrect family string in model_info, the lookup could fail without falling back to ModelFamily.UNKNOWN.

Now, we explicitly check whether model_family is a valid value in ModelFamily.ANY. If not, we fallback to _find_model_family() as intended.

Related issue number

Related #6011#issuecomment-2779957730

Checks

@SongChiYoung SongChiYoung mentioned this pull request Apr 5, 2025
@nicsuzor
Copy link
Contributor

nicsuzor commented Apr 5, 2025

Thanks! I confirm this fixes the issue I noted #6011 (comment)

@codecov
Copy link

codecov bot commented Apr 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.25%. Comparing base (faf2a4e) to head (d14e86d).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6213      +/-   ##
==========================================
- Coverage   77.25%   77.25%   -0.01%     
==========================================
  Files         200      200              
  Lines       14243    14246       +3     
==========================================
+ Hits        11004    11006       +2     
- Misses       3239     3240       +1     
Flag Coverage Δ
unittests 77.25% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ekzhu ekzhu merged commit b24df29 into microsoft:main Apr 6, 2025
58 checks passed
peterj added a commit to kagent-dev/autogen that referenced this pull request Apr 11, 2025
* upstream/main: (120 commits)
  Update discover.md with adding email agent package (microsoft#6274)
  Expose TCM TypedDict classes for apps to use (microsoft#6269)
  Fix publish_message-method() notes (microsoft#6250)
  Fix ValueError: Dataclass has a union type error (microsoft#6266)
  [Bugfix] Fix for Issue microsoft#6241 - ChromaDB removed IncludeEnum (microsoft#6260)
  Add note on ModelInfo for Gemini Models (microsoft#6259)
  .NET update autogen 0.2.2 -> autogen 0.2.3 (microsoft#6257)
  [Draft] Enable File Upload/Paste as Task in AGS (microsoft#6091)
  Bugfix/azure ai search embedding (microsoft#6248)
  Expose more Task-Centric Memory parameters (microsoft#6246)
  fix: typo in usage.md (microsoft#6245)
  .NET update oai and aoai package version (microsoft#6239)
  Fix sha256_hash docstring (microsoft#6236)
  Update json_schema_to_pydantic version and make relaxed requirement on arry item. (microsoft#6209)
  Fix terminations conditions. (microsoft#6229)
  Docker Code Exec delete temp files (microsoft#6211)
  clean codes notes for autogen-core. (microsoft#6218)
  Fix/transformer aware any modelfamily (microsoft#6213)
  chore: Add powershell path check for code executor (microsoft#6212)
  added: gemini 2.5 pro preview (microsoft#6226)
  ...

Signed-off-by: Peter Jausovec <peter.jausovec@solo.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants