autogen/python/packages/autogen-ext/tests/models
EeS b24df29ad0
Fix/transformer aware any modelfamily (#6213)
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

- [ ] I've included any doc changes needed for
<https://microsoft.github.io/autogen/>. See
<https://github.com/microsoft/autogen/blob/main/CONTRIBUTING.md> to
build and test documentation locally.
- [x] I've added tests (if relevant) corresponding to the changes
introduced in this PR.
- [x] I've made sure all auto checks have passed.

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-04-05 19:58:16 -07:00
..
test_anthropic_model_client.py Ensure message sent to LLMCallEvent for Anthropic is serializable (#6135) 2025-04-02 18:01:42 -07:00
test_azure_ai_model_client.py Add support for thought field in AzureAIChatCompletionClient (#6062) 2025-03-24 17:33:10 -07:00
test_chat_completion_cache.py feat: add structured output to model clients (#5936) 2025-03-15 07:58:13 -07:00
test_llama_cpp_model_client.py feat: add structured output to model clients (#5936) 2025-03-15 07:58:13 -07:00
test_ollama_chat_completion_client.py Fix streaming + tool bug in Ollama (#6193) 2025-04-03 14:56:01 -07:00
test_openai_model_client.py Fix/transformer aware any modelfamily (#6213) 2025-04-05 19:58:16 -07:00
test_reply_chat_completion_client.py feat: introduce ModelClientStreamingChunkEvent for streaming model output and update handling in agents and console (#5208) 2025-01-29 02:49:02 +00:00
test_sk_chat_completion_adapter.py feat: add structured output to model clients (#5936) 2025-03-15 07:58:13 -07:00
test_utils.py feat: Support R1 reasoning text in model create result; enhance API docs (#5262) 2025-01-30 11:03:54 -08:00