* fix(anthropic): Add response_format support for structured outputs
* only use from options
* use native way of response format
* ruff lint fix
* address comment; handle dict
* Fix: Add system_instructions to ChatClient LLM span tracing
- Add system_instructions parameter to _capture_messages() calls in
_trace_get_response() and _trace_get_streaming_response()
- Extract instructions from chat_options in kwargs
- Add unit tests to verify system_instructions are captured correctly
When using ChatClient with ChatOptions.instructions, the OpenTelemetry
LLM span was missing system messages in gen_ai.input.messages and the
gen_ai.system_instructions attribute was not being set.
This fix aligns the ChatClient-level tracing with the Agent-level
tracing which already correctly passes system_instructions.
Fixes#3163
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add edge case tests for system_instructions
- Add test for empty string instructions (should not set attribute)
- Add test for list-type instructions (verify multiple items captured)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Simplify: use options.get('instructions') directly instead of kwargs.get('chat_options')
Addresses reviewer feedback:
- Removed unnecessary chat_options variable from kwargs
- Directly access instructions from the options parameter
- Updated tests to use dict syntax for options (TypedDict convention)
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* added service thread support
* set service_thread_id to only supplied_thread_id
* uses raw_representation to extract the conversation_id
* removed accidental edit
* updated test to use raw_representation
* resolves copilot review feedback
* revert back StubAgent, since not used
* removed relative module import
* removed hasattr check per PR feedback
* Added provider implementation for Azure AI V1
* Small fixes
* Fixed OpenAPI example
* Fixed local MCP example
* Fixed hosted MCP example
* Fixed file search sample
* Small fixes
* Resolved comments
* Doc updates
* Group chat refactoring Part 1; Next: HIL and handoff
* Add agent approval flow; next samples
* WIP: samples
* WIP: HIL samples
* Group chat HIL working; next: handoff
* Fix group chat tool approval sample
* WIP: refactor handoff; next handoff handling
* Handoff done; next handoff samples and concurrent and sequential
* Handoff samples, concurrent, and sequential done; next Magentic
* WIP: magentic; next test with samples + HIL
* Magentic Working; next fix all samples and tests
* Fix handoff samples; next tests
* WIP: fixing tests; some orchestration as agent samples are failing
* Group chat unit tests done
* Handoff unit tests done
* Remove old orchestration_request_info and fix related tests
* Magentic unit tests done
* Fix samples
* Fix test
* Fix test 2
* mypy
* Address comments
* Update readme
* Address comments
* Address comments 2
* Replace display name