microsoft / autogen

A programming framework for agentic AI 🤖
https://microsoft.github.io/autogen/
Creative Commons Attribution 4.0 International
34.67k stars 5.01k forks source link

Consider removing azure openai automatic config property changes #4316

Open jackgerrits opened 7 hours ago

jackgerrits commented 7 hours ago

The Azure OpenAI client does some parameter fixups as detailed in the below code block:

    copied_config["azure_deployment"] = copied_config.get("azure_deployment", config.get("model"))
    if copied_config["azure_deployment"] is not None:
        copied_config["azure_deployment"] = copied_config["azure_deployment"].replace(".", "")
    copied_config["azure_endpoint"] = copied_config.get("azure_endpoint", copied_config.pop("base_url", None))

https://github.com/microsoft/autogen/blob/grpc_optional/python/packages/autogen-core/src/autogen_core/components/models/_openai_client.py#L89-L90

This is legacy from the old LLM config list. However, to be honest I now feel like these fixups are surprising and confusing. If you are opting to use the Azure client, you likely know these values or are able to look them up. I feel like we should remove these fixups to make the configuration path more obvious.