You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python: [BREAKING] Standardize model selection on model (#4999)
* Refactor Anthropic model option and provider clients
Rename the Anthropic client model option from model_id to model, add provider-specific Anthropic wrappers for Foundry, Bedrock, and Vertex, and expose them through the Anthropic, Foundry, Amazon, and Google namespaces. Update core option handling, docs, samples, and tests accordingly.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix Anthropic skills sample typing
Cast the Anthropic beta client to Any in the skills sample so the pre-commit sample pyright check no longer fails on beta skills and files endpoints that are not exposed by the current SDK stubs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* undo sample mypy
* Retry CI after transient external failures
Retrigger PR validation after an unrelated Copilot review workflow SAML failure and a transient external tau2 git fetch failure in the Windows Python test setup.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address review feedback on model option merging
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address Anthropic compatibility review feedback
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* moved all to `model`
* fixes for azure ai search
* Python: standardize remaining sample env var names
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Python: fix foundry-local pyright compatibility
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* updated env vars in cicd
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
raiseValueError("AZURE_OPENAI_ENDPOINT environment variable is required")
199
-
ifnotdeployment_name:
200
-
raiseValueError("AZURE_OPENAI_DEPLOYMENT_NAME environment variable is required")
199
+
ifnotmodel:
200
+
raiseValueError("AZURE_OPENAI_MODEL environment variable is required")
201
201
ifnot api_key:
202
202
raiseValueError("AZURE_OPENAI_API_KEY environment variable is required")
203
203
@@ -207,7 +207,7 @@ agent = Agent(
207
207
instructions="You are a helpful assistant.",
208
208
client=OpenAIChatCompletionClient(
209
209
azure_endpoint=endpoint,
210
-
model=deployment_name,
210
+
model=model,
211
211
api_key=api_key,
212
212
),
213
213
)
@@ -230,7 +230,7 @@ if __name__ == "__main__":
230
230
-**`Agent`**: The agent that will handle incoming requests
231
231
-**FastAPI Integration**: Uses FastAPI's native async support for streaming responses
232
232
-**Instructions**: The agent is created with default instructions, which can be overridden by client messages
233
-
-**Configuration**: `OpenAIChatCompletionClient` can read from environment variables (`AZURE_OPENAI_ENDPOINT`, `AZURE_OPENAI_DEPLOYMENT_NAME`, `AZURE_OPENAI_API_KEY`) or accept parameters directly
233
+
-**Configuration**: `OpenAIChatCompletionClient` can read from environment variables (`AZURE_OPENAI_ENDPOINT`, `AZURE_OPENAI_MODEL`, `AZURE_OPENAI_API_KEY`) or accept parameters directly
234
234
235
235
**Alternative (simpler)**: Use environment variables only:
236
236
@@ -249,7 +249,7 @@ Set the required environment variables:
0 commit comments