Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 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
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 to a private implementation module and renaming runtime terminal/replay helpers as private.
- 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
191 changes: 0 additions & 191 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,108 +5921,8 @@ 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]: ...


def azure.ai.agentserver.responses.models.runtime.apply_failed_terminal(
base: Mapping[str, Any],
*,
error: dict[str, Any]
) -> 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,
agent_reference: AgentReference | dict[str, Any],
model: str | None,
*,
created_at: datetime | None = ...
) -> ResponseObject: ...


def azure.ai.agentserver.responses.models.runtime.resolve_failed_response(
base: Mapping[str, Any] | None,
response_id: str,
agent_reference: AgentReference | dict[str, Any],
model: str | None,
*,
created_at: datetime | None = ...,
error_code: str = "server_error",
error_message: str = _DEFAULT_FAILED_ERROR_MESSAGE
) -> ResponseObject: ...


class azure.ai.agentserver.responses.models.runtime.AgentReference(TypedDict, total=False):
key "name": Required[str]
key "type": Required[Literal["agent_reference"]]
key "version": str
name: str
type: Literal[agent_reference]
version: str


class azure.ai.agentserver.responses.models.runtime.ResponseExecution:
property agent_reference: AgentReference | dict[str, Any] # Read-only
property is_terminal: bool # Read-only
Expand Down Expand Up @@ -6084,78 +5978,6 @@ namespace azure.ai.agentserver.responses.models.runtime
) -> None: ...


class azure.ai.agentserver.responses.models.runtime.ResponseObject(TypedDict, total=False):
key "agent_reference": Required[Optional[AgentReference]]
key "background": Optional[bool]
key "completed_at": Optional[int]
key "conversation": Optional[ConversationReference]
key "created_at": Required[int]
key "error": Required[Optional[ResponseErrorInfo]]
key "id": Required[str]
key "incomplete_details": Required[Optional[ResponseIncompleteDetails]]
key "instructions": Required[Optional[Union[str, list[Item]]]]
key "max_output_tokens": Optional[int]
key "max_tool_calls": Optional[int]
key "metadata": Optional[Metadata]
key "model": str
key "moderation": Optional[Moderation]
key "object": Required[Literal["response"]]
key "output": Required[list[OutputItem]]
key "output_text": Optional[str]
key "parallel_tool_calls": Required[bool]
key "previous_response_id": Optional[str]
key "prompt": ForwardRef('Prompt', module='types')
key "prompt_cache_key": str
key "prompt_cache_retention": Optional[Literal["in_memory", "24h"]]
key "reasoning": Optional[Reasoning]
key "safety_identifier": str
key "service_tier": Optional[Literal["auto", "default", "flex", "scale", "priority"]]
key "status": Literal["completed", "failed", "in_progress", "cancelled", "queued", "incomplete"]
key "temperature": Optional[float]
key "text": ForwardRef('ResponseTextParam', module='types')
key "tool_choice": Union[Literal["none", "auto", "required"], ToolChoiceParam]
key "top_logprobs": Optional[int]
key "top_p": Optional[float]
key "truncation": Optional[Literal["auto", "disabled"]]
key "usage": ForwardRef('ResponseUsage', module='types')
key "user": str
agent_reference: AgentReference
background: bool
completed_at: int
conversation: ConversationReference
created_at: int
error: ResponseErrorInfo
id: str
incomplete_details: ResponseIncompleteDetails
instructions: Union[str, list[Item]]
max_output_tokens: int
max_tool_calls: int
metadata: Metadata
model: str
moderation: Moderation
object: Literal[response]
output: list[OutputItem]
output_text: str
parallel_tool_calls: bool
previous_response_id: str
prompt: Prompt
prompt_cache_key: str
prompt_cache_retention: Literal[in_memory, 24h]
reasoning: Reasoning
safety_identifier: str
service_tier: Literal[auto, default, flex, scale, priority]
status: Literal[completed, failed, in_progress, cancelled, queued, incomplete]
temperature: float
text: ResponseTextParam
tool_choice: Union[ToolChoiceOptions, ToolChoiceParam]
tools: list[Tool]
top_logprobs: int
top_p: float
truncation: Literal[auto, disabled]
usage: ResponseUsage
user: str


class azure.ai.agentserver.responses.models.runtime.StreamEventRecord:
property terminal: bool # Read-only

Expand All @@ -6176,19 +5998,6 @@ namespace azure.ai.agentserver.responses.models.runtime
) -> StreamEventRecord: ...


class azure.ai.agentserver.responses.models.runtime.StreamReplayState:
property terminal_event_seen: bool # Read-only

def __init__(
self,
*,
events: list[StreamEventRecord] | None = ...,
response_id: str
) -> None: ...

def append(self, event: StreamEventRecord) -> None: ...


namespace azure.ai.agentserver.responses.store

class azure.ai.agentserver.responses.store.ResponseAlreadyExistsError(Exception):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
apiMdSha256: 2c3ff121746e6028ece71257bcd47d7421233e6f92f2d3f6612a03a5ca34735a
apiMdSha256: bf36559af5d6dc108cd68fc723cdbc31635cfe70b6439382f8a3d5b3282dd1a4
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 @@ -56,8 +56,8 @@
from ..models.runtime import (
ResponseExecution,
ResponseModeFlags,
resolve_cancelled_response,
resolve_failed_response,
_resolve_cancelled_response,
_resolve_failed_response,
)
from ..store._base import ResponseProviderProtocol, ResponseStoreCorruptionError
from ..store._foundry_errors import FoundryApiError, FoundryBadRequestError, FoundryResourceNotFoundError
Expand Down Expand Up @@ -1552,7 +1552,7 @@ async def handle_cancel(self, request: Request) -> Response:
if terminal_error is not None:
if record.status == "cancelled":
record.set_response_snapshot(
resolve_cancelled_response(
_resolve_cancelled_response(
record.response, record.response_id, record.agent_reference, record.model
)
)
Expand Down Expand Up @@ -1581,7 +1581,7 @@ async def handle_cancel(self, request: Request) -> Response:

# Set cancelled snapshot and transition
record.set_response_snapshot(
resolve_cancelled_response(record.response, record.response_id, record.agent_reference, record.model)
_resolve_cancelled_response(record.response, record.response_id, record.agent_reference, record.model)
)
# Stamp mode flags so the provider fallback can enforce B1/B2 checks
# after eager eviction removes the in-memory record.
Expand Down Expand Up @@ -1836,7 +1836,7 @@ async def handle_shutdown(self) -> None:
# Leave in current state — will be re-entered on restart.
continue
# Non-resilient or foreground: best-effort mark failed.
failed_payload = resolve_failed_response(
failed_payload = _resolve_failed_response(
record.response, record.response_id, record.agent_reference, record.model
)
record.set_response_snapshot(failed_payload)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,10 @@
ResponseExecution,
ResponseModeFlags,
ResponseStatus,
)
from ..models.runtime import (
apply_cancelled_terminal as _apply_cancelled_terminal,
)
from ..models.runtime import (
apply_failed_terminal as _apply_failed_terminal,
)
from ..models.runtime import (
resolve_cancelled_response as _resolve_cancelled_response,
)
from ..models.runtime import (
resolve_failed_response as _resolve_failed_response,
_apply_cancelled_terminal,
_apply_failed_terminal,
_resolve_cancelled_response,
_resolve_failed_response,
)
from ..store._base import ResponseAlreadyExistsError, ResponseProviderProtocol
from ..streaming._checkpoint import ResponseCheckpointEvent
Expand Down
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 @@ -191,14 +191,14 @@ def _overlay_failed_terminal(
:returns: A copy of the snapshot transitioned to ``failed``.
:rtype: ResponseObject
"""
from ..models.runtime import apply_failed_terminal # pylint: disable=import-outside-toplevel
from ..models.runtime import _apply_failed_terminal # pylint: disable=import-outside-toplevel
from ..models._generated import ResponseObject # pylint: disable=import-outside-toplevel

error = {
"code": "server_error",
"message": message if message is not None else _server_error_message(shutdown_reason),
}
return cast(ResponseObject, apply_failed_terminal(snapshot, error=error))
return cast(ResponseObject, _apply_failed_terminal(snapshot, error=error))


# (Spec 033 §3.1) Process-local cache of typed :class:`RuntimeRefs` (record,
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
Loading
Loading