MCPcopy Index your code
hub / github.com/SkyworkAI/DeepResearchAgent / test_response_format

Function test_response_format

tests/test_models.py:188–263  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

186
187
188async def test_response_format():
189 logger.info(f"| --------------------------------------------------")
190 logger.info(f"| Testing response format with different models")
191 models = [
192 # OpenAI models
193 # "openrouter/gpt-4o",
194 # "openrouter/gpt-4.1",
195 # "openrouter/gpt-5",
196 # "openrouter/gpt-5.1",
197 # "openrouter/gpt-5.2",
198 # "openrouter/o3",
199 # "openai/gpt-4o",
200 # "openai/gpt-4.1",
201 # "openai/gpt-5",
202 # "openai/gpt-5.1",
203 # "openai/o3",
204
205 # Anthropic models
206 # "openrouter/claude-sonnet-3.7",
207 # "openrouter/claude-sonnet-4",
208 # "openrouter/claude-opus-4",
209 # "openrouter/claude-sonnet-4.5",
210 # "openrouter/claude-opus-4.5",
211 # "anthropic/claude-sonnet-4.5",
212
213 # Gemini models
214 # "openrouter/gemini-2.5-flash",
215 # "openrouter/gemini-2.5-pro",
216 # "openrouter/gemini-3-pro-preview",
217 "openrouter/gemini-3-flash-preview",
218 # "google/gemini-2.5-flash",
219 # "google/gemini-2.5-pro",
220 # "google/gemini-3-pro-preview",
221 ]
222
223 class ToolInputArgs(BaseModel):
224 name: str = Field(description="The name of the tool")
225 args: Dict[str, Any] = Field(description="The arguments of the tool")
226
227 class ThinkOutput(BaseModel):
228 thinking: str = Field(description="The thinking process of the assistant")
229 previous_goal: str = Field(description="The previous goal of the assistant")
230 next_goal: str = Field(description="The next goal of the assistant")
231 tool: List[ToolInputArgs] = Field(description="The list of tools to call")
232
233 prompt = """
234 <available_tools>
235 available_tools:
236 <done>
237 done: DoneTool
238 - result: The result of the task
239 - reasoning: The reasoning process of the task
240 </done>
241 <example>
242 Example: {"name": "done", "args": {"result": "The task has been completed.", "reasoning": "The task has been completed successfully."}}
243 </example>
244
245 Please add the numbers 1 and 2, get the result and call the done tool with the result.

Callers 1

mainFunction · 0.85

Calls 6

SystemMessageClass · 0.90
HumanMessageClass · 0.90
ContentPartTextClass · 0.90
printFunction · 0.85
infoMethod · 0.45
model_dumpMethod · 0.45

Tested by

no test coverage detected