[pull] main from github:main - #223
Merged
Merged
Conversation
…ts (#2225) * fix(python): serialize Pydantic models with mode='json' in tool results model_dump() defaults to mode='python', which leaves datetime, UUID, Decimal, Enum and set as native Python objects. json.dumps then fails on these, and the error is swallowed as a generic tool failure. Use model_dump(mode='json') so Pydantic converts all fields to JSON-safe types before serialization. Closes #2203 * test(python): strengthen Pydantic result coverage Assert the JSON representation of date and datetime fields, cover set serialization, and fix import ordering for Ruff. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: j-zhangyiyuan <j-zhangyiyuan@microsoft.com> Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds per-session EnableExperimentalMode (enableExperimentalMode /
enable_experimental_mode) to all SDK languages. The flag controls whether
the session enables experimental features.
Semantics are mode-aware and consistent across languages:
- In "empty" mode the SDK sends false unless the caller explicitly sets
true, so headless integrations are not silently opted into experimental
behaviour.
- In "copilot-cli" mode the field is omitted from the wire when nil/null/
None, letting the runtime decide (e.g. based on staff-user flags).
Wire field is isExperimentalMode on both session.create and session.resume.
Changes per language:
- Rust: enable_experimental_mode on SessionConfig / ResumeSessionConfig,
experimental_mode_for_mode helper in mode.rs, 6 new unit tests
- .NET: EnableExperimentalMode on SessionOptions / SessionResumeOptions,
mode-aware default in Client.CreateSessionAsync/ResumeSessionAsync
- Node: enableExperimentalMode on SessionOptions / SessionResumeOptions
- Python: enable_experimental_mode param on create_session/resume_session,
_enable_experimental_mode_default helper in _mode.py
- Go: EnableExperimentalMode on SessionConfig / ResumeSessionConfig,
empty-mode default in mode_empty.go
- Java: enableExperimentalMode on SessionConfig / ResumeSessionConfig,
experimentalModeForMode helper in SessionRequestBuilder
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Bumps the npm_and_yarn group with 1 update in the /scripts/docs-validation directory: [brace-expansion](https://github.com/juliangruber/brace-expansion). Updates `brace-expansion` from 5.0.6 to 5.0.9 - [Release notes](https://github.com/juliangruber/brace-expansion/releases) - [Commits](juliangruber/brace-expansion@v5.0.6...v5.0.9) --- updated-dependencies: - dependency-name: brace-expansion dependency-version: 5.0.9 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ete (#2212) The Node.js extension-authoring docs listed a `toolName` field on the `tool.execution_complete` session event, in two event-field reference tables and three handler code-comments. That event has no `toolName`: `ToolExecutionCompleteData` declares `required: ["toolCallId","success"]` with `additionalProperties: false` and no `toolName` property, so reading `event.data.toolName` in a completion handler is always undefined. `toolName` is emitted on `tool.execution_start`, and a completion is correlated to its start by `toolCallId`. Remove the field from the two `tool.execution_complete` rows and the three completion-handler comments. It stays on the `tool.execution_start` rows. The repository's shared event reference in docs/features/streaming-events.md already documents the event without it. Co-authored-by: examon <examon@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )