Skip to content
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
06da564
Decouple agentserver responses from generated model internals
Shivakishore14 Jul 10, 2026
c4e25b2
Regenerate agentserver response models from source emitter
Shivakishore14 Jul 10, 2026
2e9a3b1
Reduce redundant agentserver wire conversions
Shivakishore14 Jul 10, 2026
a7fe835
Use source-fixed AgentServer TypeDict generation
Shivakishore14 Jul 15, 2026
7595462
Update AgentServer TypedDict SDK from spec PR
Shivakishore14 Jul 15, 2026
17b1a55
Remove redundant AgentServer wire helpers
Shivakishore14 Jul 16, 2026
039fbd2
Merge remote-tracking branch 'origin/main' into sshiva/agentserver-ty…
Shivakishore14 Jul 16, 2026
23c9a46
Align AgentServer enum shim with main
Shivakishore14 Jul 16, 2026
e97042d
Sync AgentServer spec pointer
Shivakishore14 Jul 16, 2026
4263a53
Fix AgentServer Responses CI issues
Shivakishore14 Jul 16, 2026
01233dd
Fix AgentServer Responses sample typing
Shivakishore14 Jul 17, 2026
6fe830f
Merge branch 'main' into sshiva/agentserver-typeddict-local
Shivakishore14 Jul 17, 2026
8ab986f
Sync AgentServer contracts from correct spec branch
Shivakishore14 Jul 17, 2026
0e27517
Address AgentServer Responses review comments
Shivakishore14 Jul 20, 2026
439f4be
Fix AgentServer Responses docs CI
Shivakishore14 Jul 20, 2026
53b220a
Fix AgentServer Analyze mypy failures
Shivakishore14 Jul 20, 2026
c8a3d8c
Address AgentServer response model suggestions
Shivakishore14 Jul 20, 2026
04dda5e
Fix AgentServer enum fallback spellcheck
Shivakishore14 Jul 21, 2026
a6977ef
Fix AgentServer enum and timestamp contracts
Shivakishore14 Jul 21, 2026
92db0e3
Address AgentServer review and API consistency
Shivakishore14 Jul 21, 2026
1ec49f6
Fix AgentServer stream TTL contract tests
Shivakishore14 Jul 21, 2026
34b2061
Hide internal AgentServer message models
Shivakishore14 Jul 21, 2026
26383d8
Remove AgentServer generated enum shim
Shivakishore14 Jul 23, 2026
dc5612c
Align AgentServer validators with TypedDict literals
Shivakishore14 Jul 23, 2026
6715884
Align function-call input id contract with spec
Shivakishore14 Jul 23, 2026
76cec63
Advance AgentServer spec pin to PR tip
Shivakishore14 Jul 23, 2026
b9e6b59
Fix AgentServer validator literal handling
Shivakishore14 Jul 23, 2026
af85d78
Merge branch 'main' into sshiva/agentserver-typeddict-local
Shivakishore14 Jul 27, 2026
2762371
Merge branch 'main' into sshiva/agentserver-typeddict-local
Shivakishore14 Jul 28, 2026
adc5760
Fix agentserver generated docs warnings
Shivakishore14 Jul 28, 2026
5160464
Merge remote-tracking branch 'origin/main' into sshiva/agentserver-ty…
Copilot Jul 29, 2026
0dadb89
Merge main into agentserver TypeDict PR
Shivakishore14 Jul 29, 2026
79b4d5e
Document agentserver TypedDict migration
Shivakishore14 Jul 29, 2026
cc43307
Fix agentserver CI validation
Shivakishore14 Jul 29, 2026
6bd3ab6
Hide agentserver response internals from API surface
Shivakishore14 Jul 30, 2026
1edb8ca
Trim weak-evidence response helper exports
Shivakishore14 Jul 31, 2026
34af68e
Keep public runtime signature types importable
Shivakishore14 Jul 31, 2026
fc0beea
Restore response helper exports for SDK parity
Shivakishore14 Jul 31, 2026
98b984f
Clean up agentserver responses API surface
Shivakishore14 Jul 31, 2026
dd08324
Bump agentserver responses version to 2.0.0b1
Shivakishore14 Jul 31, 2026
54fe469
Merge remote-tracking branch 'origin/main' into sshiva/agentserver-ap…
Shivakishore14 Aug 3, 2026
a38393c
Move runtime helpers out of public surface
Shivakishore14 Aug 3, 2026
10805eb
Keep runtime helpers private in runtime module
Shivakishore14 Aug 3, 2026
37dd7d9
Merge branch 'main' into sshiva/agentserver-api-review-public-surface
Shivakishore14 Aug 3, 2026
25d80d0
Fix runtime helper docstrings
Shivakishore14 Aug 3, 2026
742f535
Merge remote-tracking branch 'origin/sshiva/agentserver-api-review-pu…
Shivakishore14 Aug 3, 2026
422d9d6
Merge remote-tracking branch 'origin/main' into sshiva/agentserver-ap…
Shivakishore14 Aug 4, 2026
5a45a65
Merge remote-tracking branch 'origin/main' into sshiva/agentserver-ap…
Shivakishore14 Aug 4, 2026
6fe4b3c
Fix resilient shutdown recovery handoff
Shivakishore14 Aug 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Other Changes

- Cleaned up the public API surface by moving validation-only error helpers and runtime response builder helpers to private implementation modules.
- Bumped the minimum `azure-ai-agentserver-core` dependency to `>=2.0.0b10`, which adds an opt-in gate for resilient-task startup recovery. The resilient Responses samples now call `set_resilient_tasks_enabled(True)` to explicitly opt in, mirroring the invocations resilient samples.

## 2.0.0b0 (2026-07-29)
Expand Down
65 changes: 0 additions & 65 deletions sdk/agentserver/azure-ai-agentserver-responses/api.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
```py
namespace azure.ai.agentserver.responses

def azure.ai.agentserver.responses.get_conversation_id(request: CreateResponse | ResponseObject) -> Optional[str]: ...


def azure.ai.agentserver.responses.get_input_expanded(request: CreateResponse) -> list[Item]: ...
Comment thread
Shivakishore14 marked this conversation as resolved.


def azure.ai.agentserver.responses.to_output_item(item: Item, response_id: str | None = None) -> OutputItem | None: ...


class azure.ai.agentserver.responses.ConversationChainMetadataNamespace(Protocol): implements Collection

def __call__(self, name: Optional[str] = None) -> ConversationChainMetadataNamespace: ...
Expand Down Expand Up @@ -5927,47 +5921,6 @@ namespace azure.ai.agentserver.responses.models
type: Literal[workflow_action]


namespace azure.ai.agentserver.responses.models.errors

class azure.ai.agentserver.responses.models.errors.ApiErrorResponse(TypedDict, total=False):
key "error": Required[Error]
error: Error


class azure.ai.agentserver.responses.models.errors.Error(TypedDict, total=False):
key "code": Required[Optional[str]]
key "message": Required[str]
key "param": Optional[str]
key "type": str
additionalInfo: dict[str, Any]
additional_info: dict[str, Any]
code: str
debugInfo: dict[str, Any]
debug_info: dict[str, Any]
details: list[Error]
message: str
param: str
type: str


class azure.ai.agentserver.responses.models.errors.RequestValidationError(ValueError):

def __init__(
self,
message: str,
*,
code: str = "invalid_request_error",
debug_info: dict[str, Any] | None = ...,
details: list[dict[str, str]] | None = ...,
error_type: str = "invalid_request_error",
param: str | None = ...
) -> None: ...

def to_api_error_response(self) -> ApiErrorResponse: ...

def to_error(self) -> Error: ...


namespace azure.ai.agentserver.responses.models.runtime

def azure.ai.agentserver.responses.models.runtime.apply_cancelled_terminal(base: Mapping[str, Any]) -> dict[str, Any]: ...
Expand All @@ -5980,24 +5933,6 @@ namespace azure.ai.agentserver.responses.models.runtime
) -> dict[str, Any]: ...


def azure.ai.agentserver.responses.models.runtime.build_cancelled_response(
response_id: str,
agent_reference: AgentReference | dict[str, Any],
model: str | None,
created_at: datetime | None = None
) -> ResponseObject: ...


def azure.ai.agentserver.responses.models.runtime.build_failed_response(
response_id: str,
agent_reference: AgentReference | dict[str, Any],
model: str | None,
created_at: datetime | None = None,
error_message: str = "An internal server error occurred.",
error_code: str = "server_error"
) -> ResponseObject: ...


def azure.ai.agentserver.responses.models.runtime.resolve_cancelled_response(
base: Mapping[str, Any] | None,
response_id: str,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
apiMdSha256: 2c3ff121746e6028ece71257bcd47d7421233e6f92f2d3f6612a03a5ca34735a
apiMdSha256: 791aa262be4b10719e1a9ddde5516041bdad4d169806f83d5ebaef26474ccb30
parserVersion: 0.3.30
pythonVersion: 3.12.10
pythonVersion: 3.11.15
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
from .hosting._routing import ResponsesAgentServerHost
from .models import CreateResponse, ResponseObject
from .models._helpers import (
get_conversation_id,
get_input_expanded,
to_output_item,
)
from .store._base import ResponseProviderProtocol
from .store._file import FileResponseStore
Expand Down Expand Up @@ -59,7 +57,5 @@
"TextResponse",
"CreateResponse",
"ResponseObject",
"get_conversation_id",
"get_input_expanded",
"to_output_item",
]
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from ..models import AgentReference, CreateResponse

from .._id_generator import IdGenerator
from ..models.errors import RequestValidationError
from ..models._errors import RequestValidationError

_X_AGENT_RESPONSE_ID_HEADER = "x-agent-response-id"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from .._id_generator import IdGenerator
from .._options import ResponsesServerOptions
from ..models import ApiErrorResponse, CreateResponse
from ..models.errors import RequestValidationError
from ..models._errors import RequestValidationError
from ..models._validators import (
validate_create_response_payload,
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
"""Error model types for request validation failures."""
"""Internal error model helpers for request validation failures."""

from __future__ import annotations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def terminal_event_seen(self) -> bool:
return bool(self.events and self.events[-1].terminal)


def build_cancelled_response(
def _build_cancelled_response(
Comment thread
Shivakishore14 marked this conversation as resolved.
response_id: str,
agent_reference: AgentReference | dict[str, Any],
model: str | None,
Expand Down Expand Up @@ -374,7 +374,7 @@ def build_cancelled_response(
return cast(ResponseObject, payload)


def build_failed_response(
def _build_failed_response(
response_id: str,
agent_reference: AgentReference | dict[str, Any],
model: str | None,
Expand Down Expand Up @@ -481,7 +481,7 @@ def resolve_failed_response(
When ``base`` (the handler-produced snapshot) exists, the failed terminal
is overlaid onto it so no handler-owned fields are lost. When it is absent
(the handler crashed before ``response.created``, so there is nothing to
preserve), a minimal object is synthesized via :func:`build_failed_response`.
preserve), a minimal object is synthesized via :func:`_build_failed_response`.

:param base: The handler's response snapshot, or ``None`` if none exists.
:type base: ~typing.Mapping[str, ~typing.Any] | None
Expand All @@ -502,7 +502,7 @@ def resolve_failed_response(
"""
if base is not None:
return cast(ResponseObject, apply_failed_terminal(base, error={"code": error_code, "message": error_message}))
return build_failed_response(
return _build_failed_response(
response_id, agent_reference, model, created_at=created_at, error_message=error_message, error_code=error_code
)

Expand All @@ -519,7 +519,7 @@ def resolve_cancelled_response(

When ``base`` exists it is overlaid (status → ``cancelled``, output
cleared); otherwise a minimal object is synthesized via
:func:`build_cancelled_response`.
:func:`_build_cancelled_response`.

:param base: The handler's response snapshot, or ``None`` if none exists.
:type base: ~typing.Mapping[str, ~typing.Any] | None
Expand All @@ -536,4 +536,4 @@ def resolve_cancelled_response(
"""
if base is not None:
return cast(ResponseObject, apply_cancelled_terminal(base))
return build_cancelled_response(response_id, agent_reference, model, created_at=created_at)
return _build_cancelled_response(response_id, agent_reference, model, created_at=created_at)
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ azure.ai.agentserver.responses.models package
Submodules
----------

azure.ai.agentserver.responses.models.errors module
---------------------------------------------------

.. automodule:: azure.ai.agentserver.responses.models.errors
:inherited-members:
:members:
:undoc-members:

azure.ai.agentserver.responses.models.runtime module
----------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
service_unavailable_response,
tag_platform_error,
)
from azure.ai.agentserver.responses.models.errors import RequestValidationError
from azure.ai.agentserver.responses.models._errors import RequestValidationError

# ---------------------------------------------------------------------------
# is_platform_error / tag_platform_error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from azure.ai.agentserver.responses.hosting._validation import parse_create_response
from azure.ai.agentserver.responses.models._validators import validate_create_response_payload
from azure.ai.agentserver.responses.models.errors import RequestValidationError
from azure.ai.agentserver.responses.models._errors import RequestValidationError

# ---------------------------------------------------------------------------
# parse_create_response integration tests (real validator + real model)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
"""Unit tests for ResponseExecution fields, properties, apply_event, and build_cancelled_response."""
"""Unit tests for ResponseExecution fields, properties, apply_event, and cancelled response building."""

from __future__ import annotations

Expand All @@ -11,7 +11,7 @@
from azure.ai.agentserver.responses.models.runtime import (
ResponseExecution,
ResponseModeFlags,
build_cancelled_response,
_build_cancelled_response,
)

# ---------------------------------------------------------------------------
Expand Down Expand Up @@ -222,12 +222,12 @@ def test_apply_event_output_item_added() -> None:


# ---------------------------------------------------------------------------
# T12 – build_cancelled_response
# T12 - _build_cancelled_response
# ---------------------------------------------------------------------------


def test_build_cancelled_response() -> None:
response = build_cancelled_response(
response = _build_cancelled_response(
"caresp_xxx0000000000000000000000000000",
{"name": "agent-a"},
"gpt-4o",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
to_api_error_response,
validate_create_response,
)
from azure.ai.agentserver.responses.models.errors import RequestValidationError
from azure.ai.agentserver.responses.models._errors import RequestValidationError


class _FakeCreateRequest(dict):
Expand Down
Loading