Skip to content

Python: adr for python client constructors#2300

Closed
eavanvalkenburg wants to merge 15 commits intomicrosoft:mainfrom
eavanvalkenburg:python_client_adr
Closed

Python: adr for python client constructors#2300
eavanvalkenburg wants to merge 15 commits intomicrosoft:mainfrom
eavanvalkenburg:python_client_adr

Conversation

@eavanvalkenburg
Copy link
Member

Motivation and Context

We need to decide how to handle clients that can have different backends and make it consistent.

Description

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

Copilot AI review requested due to automatic review settings November 18, 2025 13:02
@markwallace-microsoft markwallace-microsoft added documentation Improvements or additions to documentation python labels Nov 18, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR proposes an Architecture Decision Record (ADR) for standardizing how Python client constructors should handle different backends (e.g., OpenAI vs Azure OpenAI, Anthropic vs Anthropic Bedrock) in the Agent Framework. The document explores five different architectural approaches for handling multi-backend client creation, weighing their tradeoffs in terms of maintainability, discoverability, and ease of use. The PR also includes routine dependency updates in the Python lock file.

Reviewed Changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
docs/decisions/001X-python-client-constructors.md New ADR document proposing design patterns for Python client constructors with multi-backend support
python/uv.lock Dependency version updates for various packages including openai, anthropic, numpy, and other dependencies

@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Jan 22, 2026

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
packages/anthropic/agent_framework_anthropic
   _chat_client.py42719953%58, 626, 685–691, 696, 714, 716–717, 722–723, 725–726, 731–732, 737–739, 741, 751–752, 756, 761–762, 764–765, 767–768, 770–771, 773, 779, 783–786, 791–798, 800, 834, 857, 859, 874, 896–899, 908, 910, 941–945, 947, 949–950, 952, 957–958, 960, 993–994, 1003, 1005–1006, 1011, 1028–1029, 1071, 1086, 1090–1091, 1107, 1116, 1118, 1122–1123, 1166–1168, 1170, 1183–1184, 1191–1193, 1197–1199, 1203–1206, 1217, 1219, 1241, 1251, 1273–1279, 1286–1287, 1295–1296, 1304–1307, 1314–1315, 1321–1322, 1328–1329, 1335, 1343–1345, 1349, 1356–1357, 1363–1364, 1370–1371, 1377, 1385–1388, 1395–1396, 1415, 1422–1423, 1442, 1464, 1466, 1475–1476, 1482, 1504–1505, 1511–1512, 1521–1531, 1538–1544, 1551–1557, 1564–1573, 1580–1583
   _shared.py39489%248, 250, 255, 260
packages/azure-ai/agent_framework_azure_ai
   _shared.py30112359%103–104, 107–109, 112–117, 119, 150, 152, 154, 156, 201, 289–292, 295–297, 300–301, 311, 318–320, 346–355, 360, 408, 424–426, 428–445, 453–456, 461–462, 466–473, 478–479, 485–488, 490, 510–512, 515–516, 518, 530, 532–533, 536–539, 542, 544–545, 547–555, 557, 593, 595–598, 600, 606, 612, 616, 631, 634–635, 637
packages/copilotstudio/agent_framework_copilotstudio
   _agent.py75494%154–155, 190, 198
packages/core/agent_framework
   _pydantic.py50100% 
   _settings.py181995%79, 114, 123–125, 256, 274–275, 465
   observability.py62514476%244, 312–317, 319, 321–322, 324, 326–328, 331–333, 338–339, 345–346, 352–353, 360, 362–364, 367–369, 374–375, 381–382, 388–389, 396, 433, 436, 439–441, 444, 447–448, 451–453, 455–457, 460, 547, 549, 631, 649–650, 652, 655, 663–664, 667–670, 672, 675–677, 680–681, 694–700, 702–711, 714–718, 721–724, 726–729, 732–733, 741, 842, 844, 869–871, 993, 995, 999–1004, 1006, 1009–1013, 1015, 1290, 1374–1376, 1449–1451, 1615, 1618, 1677, 1761, 1763, 1770, 1786, 1789, 1849, 1865, 1869, 2003, 2005
packages/core/agent_framework/openai
   _assistant_provider.py1091189%153–154, 166, 291, 357, 472–477
   _assistants_client.py3593689%65, 463, 487, 567, 584, 608, 639, 653, 656, 658–659, 662, 665, 668–669, 680, 705, 707, 709, 711, 713, 718, 721, 724, 728, 739, 824, 909, 944, 981–984, 1036, 1053, 1098
   _chat_client.py3693291%51, 185–186, 190, 276, 283, 364–371, 373–376, 395, 412–413, 518, 555, 571, 845–846, 868, 964, 969, 978, 980, 995
   _responses_client.py6648087%258, 263, 265–266, 277, 295, 303, 326, 388, 420, 445, 451, 469–470, 492, 497, 553, 567, 584, 595–598, 652, 731, 736, 740–742, 746–747, 770, 839, 861–862, 877–878, 896–897, 1028–1029, 1045, 1047, 1122–1130, 1178, 1233, 1248, 1284–1285, 1287–1289, 1303–1305, 1315–1316, 1322, 1337, 1611, 1655, 1679, 1754, 1771, 1780, 1782, 1796, 1801, 1810, 1817–1819
   _shared.py1954576%241, 261, 271, 279, 292, 328, 334–337, 369, 371, 378, 393, 410–411, 414–415, 417, 459–462, 465, 467–475, 478–479, 481–482, 486, 488, 492–493, 497, 557–558, 560
packages/purview/agent_framework_purview
   _settings.py350100% 
TOTAL17403266084% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3345 215 💤 0 ❌ 0 🔥 1m 10s ⏱️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants