@@ -133,7 +133,7 @@ class Agent(AbstractAgent[AgentDepsT, OutputDataT]):
133133 be merged with this value, with the runtime argument taking priority.
134134 """
135135
136- _output_type : OutputSpec [OutputDataT ]
136+ _output_type : OutputSpec [OutputDataT , AgentDepsT ]
137137
138138 instrument : InstrumentationSettings | bool | None
139139 """Options to automatically instrument with OpenTelemetry."""
@@ -170,7 +170,7 @@ def __init__(
170170 self ,
171171 model : models .Model | models .KnownModelName | str | None = None ,
172172 * ,
173- output_type : OutputSpec [OutputDataT ] = str ,
173+ output_type : OutputSpec [OutputDataT , AgentDepsT ] = str ,
174174 instructions : Instructions [AgentDepsT ] = None ,
175175 system_prompt : str | Sequence [str ] = (),
176176 deps_type : type [AgentDepsT ] = NoneType ,
@@ -198,7 +198,7 @@ def __init__(
198198 self ,
199199 model : models .Model | models .KnownModelName | str | None = None ,
200200 * ,
201- output_type : OutputSpec [OutputDataT ] = str ,
201+ output_type : OutputSpec [OutputDataT , AgentDepsT ] = str ,
202202 instructions : Instructions [AgentDepsT ] = None ,
203203 system_prompt : str | Sequence [str ] = (),
204204 deps_type : type [AgentDepsT ] = NoneType ,
@@ -224,7 +224,7 @@ def __init__(
224224 self ,
225225 model : models .Model | models .KnownModelName | str | None = None ,
226226 * ,
227- output_type : OutputSpec [OutputDataT ] = str ,
227+ output_type : OutputSpec [OutputDataT , AgentDepsT ] = str ,
228228 instructions : Instructions [AgentDepsT ] = None ,
229229 system_prompt : str | Sequence [str ] = (),
230230 deps_type : type [AgentDepsT ] = NoneType ,
@@ -419,7 +419,7 @@ def deps_type(self) -> type:
419419 return self ._deps_type
420420
421421 @property
422- def output_type (self ) -> OutputSpec [OutputDataT ]:
422+ def output_type (self ) -> OutputSpec [OutputDataT , AgentDepsT ]:
423423 """The type of data output by agent runs, used to validate the data returned by the model, defaults to `str`."""
424424 return self ._output_type
425425
0 commit comments