New Features of GPT-6 Astra
Async Tool Calling: Asynchronous Tool Invocation [Supported]
1. Async Tool Calling
1.1 Function Description
Asynchronous tool calls allow the model to proceed without waiting for the tool to finish executing after initiating a tool call:
-
Answer questions that do not rely on tool results;
-
Perform other inference or generation tasks;
-
Initiate more tool calls;
-
Proceed to complete the part that relies on the results after the tool returns the results.
Note:
-
The tool is still executed by the application;
-
OpenAI is not responsible for running background tasks;
-
This capability is different from Background mode;
-
Only applicable to the
functionandcustomtools provided by the application; -
Not applicable to built-in tools hosted by OpenAI;
-
Do not enable both async tools and parallel tool calls simultaneously in the multi-agent mode.
1.2 New Input Parameters
Add the following to the tools definition:
Complete tools definition example:
{
"tools": [
{
"type": "function",
"name": "get_current_weather",
"description": "Get the current weather in a given location",
"async": true,
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA"
},
"unit": {
"type": "string",
"enum": [
"celsius",
"fahrenheit"
]
}
},
"required": [
"location",
"unit"
]
}
}
]
}
1.3 New Output Parameters
The output item corresponding to asynchronous tool invocation, i. e., function_callor custom_tool_call, will contain the following:
Example:
{
"output": [
{
"id": "fc_026d0acff40f36c8006a9bacea6508819082ead7215522c52d",
"type": "function_call",
"status": "completed",
"arguments": "{\"location\":\"Boston, MA\",\"unit\":\"fahrenheit\"}",
"async": true,
"call_id": "call_27374x4jvWhGLhYWEAiTvikf",
"name": "get_current_weather"
}
]
}
After the asynchronous tool finishes execution, the application needs to return the following in subsequent requests:
{
"type": "function_call_output",
"call_id": "call_weather_123",
"output": "{\"temperature_c\":22,\"condition\":\"Clear\"}"
}
For custom tools, use the following:
1.4 Request Example
First request
curl --location --request POST 'https://genaiapi.cloudsway.net/v1/ai/{ENDPOINT}/responses' \
--header 'Authorization: Bearer {your_AK}' \
--header 'Content-Type: application/json' \
--data-raw '{
"input": "What is the weather like in Boston today?",
"tools": [
{
"type": "function",
"name": "get_current_weather",
"description": "Get the current weather in a given location",
"async": true,
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA"
},
"unit": {
"type": "string",
"enum": [
"celsius",
"fahrenheit"
]
}
},
"required": [
"location",
"unit"
]
}
}
],
"tool_choice": "auto"
}'
return result
{
"id": "resp_0b4a74589255418c006a9bc6bd9c488196813cc4f322660063",
"metadata": {},
"model": "MaaS_GP_6_astra_20260903",
"output": [
{
"id": "fc_0b4a74589255418c006a9bc6be7b148196bb7512c1d68018f0",
"type": "function_call",
"status": "completed",
"arguments": "{\"location\":\"Boston, MA\",\"unit\":\"fahrenheit\"}",
"async": true,
"call_id": "call_AREgWh7GTrAPC9X38d6Wxxhz",
"name": "get_current_weather"
},
{
"id": "rs_0b4a74589255418c006a9bc6bf968c8196b72f613cbb6d8fdd",
"type": "reasoning",
"content": [],
"encrypted_content": "gAAAAABqm8bBF-BoWNbJZVsxo8GEw3B_C0ELLXPUCAZGvhXhfq1ePnu8ysNJ0OSrV0mE0tyo2hOjelwdl6Y2LSpzyoTNVWHIb0dVTkb_yoC3ocF0LGM48g6RYGriO7jfccxCnXujHgcfqn_Pfnc7cnSUQVD1SUyrO2-dLJUp88bGRt-R0Tekzv3TwlmsXTj2gB7iI5n-eij1n_B9UyJ1F9I0C7nqS1PyHBKG2UXFs3iP6L1ModvZd1yfstQfoaG8ICghgtjv--MW3-clBYAO9bUbhbVBpToZqjUV3-ukaddjKa67bTHh3aKnw6J--FR-yNCocaT9UvbbqpTON_laNBHJCQAd97b9HWNf7SZFkVE-iTLqe4Y1PdzEShkyaQY7WHwIkY6ZHGug7g9zD5Qs4W3_XuCd2JrSXWM1bsT3TKvGw6KVl2WhoGYV7BWVJYPf0RKOxnhyqBHT9eCwrR-otzm-LEMUx9ZNCLKzIVAjenJxP-eLzjBQxmLfCkm8uo0DMLDGxZLx2CL-ll0WbZfcsFhRon5Ygx6LM1DS5xWbrpq_swsE5hQe-ERR2qUSo8NqHw2V3hjH1hYJSMBw2B-KV0HASBitPczwHwmxJ7zlw6W3kS8Wm72YJnWV5rgEbBlfq38SFh578mau6zJrKodezzzmhJsyrg8LJenl-9NVABu9sIwvPTrjo5dRmAOZt80-Yxai1giTmVb4BUFEJHsuN-__NzYSCteeWg-9UlMWLQqN1U01iUO_LtV4DXfR-X8WmJX__CU2JhS__2wz35OxVxeRuf4G6TLNti_by4JXX4D7NOvsKxx1_0ZnqRbA8xGiC9iZIUzdXpQ0U6gGIS3vdLJ1Rxyvqa7YeIuYB3cipvRQAi5RjxWRA-Cr7ojfMdJiO75MbYxaf2QjyPb_DplaBWUMpCNw1LHb68l6yYRxMuqGurUrzA2UYynyLAJeYi81oVQhr1MNWdbFZafpsKIyvDbMCgRlEg4oQtcGjYf7lx2IyM18D7w9kwBzFXVvwHD26nvfGN5eUqWG__rb7VDJ4IfSAwhWhqgdsBRATFpuAu9G5-J_CyD_vZOTNb2InV4n0dZWgh1AuMS1ymFrC2HmF7pwfe3i7aB_SLGd85oYDhzTnilIlgXULa-hQ4rXH3RSSP5_PplgEXfB3bv2uco92hlDY-au1kr72JxRoLiht8FAhob0ur-OHWKZlBg2Y0mpMKaYNQBRjsQUOAzgjsj1uduYry3Q5_bCpoKEDQVWI1d2FXbeOafDBJxHoFSADYnBKJaFiiRfhjwEHuct1CDVZRp7207bX3c3QKxjR3jI5VXA5XlzvjMiDVbzCpLtov-oLnc6WnurodPPwXvlk3ujAeP3Qq1vQwdZRHsQ5rRPGDSYNzHqDJM2fIvg2XynYPhRYDFuw5QLgoiwWi50X9MCGKAxhYKsBmy15a1xsAeNO_1tpPRsvCpPOfpUavm0vC4NTGiVeVcQVwpjqinZxBzAsPrfvhzN9PcjKlemyB_npqgbbIB4lclZl0gNoDDDnCTtKVuxVIGX4wgPA4jn4UxJuE32t5v404u3Mzw4A_AlV98GG7M-quYpuOmnukWJuEFcENaVqkTeIvzO0kbIRz-y9p6T3e6-RvYqJQ==",
"summary": []
},
{
"id": "msg_0b4a74589255418c006a9bc6c0fe3c8196bb128829932836a3",
"type": "message",
"status": "completed",
"content": [
{
"type": "output_text",
"annotations": [],
"logprobs": [],
"text": "I haven’t received the live weather data for Boston, MA, yet, so I can’t reliably report today’s conditions. For the latest forecast, check your weather app or weather.gov."
}
],
"phase": "final_answer",
"role": "assistant"
}
],
"temperature": 1.0,
"tools": [
{
"type": "function",
"async": true,
"description": "Get the current weather in a given location",
"name": "get_current_weather",
"output_schema": null,
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA"
},
"unit": {
"type": "string",
"enum": [
"celsius",
"fahrenheit"
]
}
},
"required": [
"location",
"unit"
],
"additionalProperties": false
},
"strict": true
}
],
"background": false,
"reasoning": {
"mode": "standard",
"context": "all_turns",
"effort": "medium"
},
"status": "completed",
"text": {
"format": {
"type": "text"
},
"verbosity": "medium"
},
"truncation": "disabled",
"usage": {
"input_tokens": 127,
"input_tokens_details": {
"cached_tokens": 0,
"cache_write_tokens": 0
},
"output_tokens": 146,
"output_tokens_details": {
"reasoning_tokens": 76
},
"total_tokens": 273
},
"store": true,
"created_at": 1788593853,
"object": "response",
"parallel_tool_calls": true,
"tool_choice": "auto",
"top_p": 0.98,
"completed_at": 1788593857,
"prompt_cache_retention": "in_memory",
"service_tier": "default",
"top_logprobs": 0,
"presence_penalty": 0.0,
"frequency_penalty": 0.0
}
Second Request
curl --location --request POST 'https://genaiapi.cloudsway.net/v1/ai/{ENDPOINT}/responses' \
--header 'Authorization: Bearer {your_AK}' \
--header 'Content-Type: application/json' \
--data-raw '{
"previous_response_id": "resp_0b4a74589255418c006a9bc6bd9c488196813cc4f322660063",
"input": [
{
"type": "function_call_output",
"call_id": "call_AREgWh7GTrAPC9X38d6Wxxhz",
"output": "Clear skies, 80°F"
}
],
"tools": [
{
"type": "function",
"name": "get_current_weather",
"description": "Get the current weather in a given location",
"async": true,
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA"
},
"unit": {
"type": "string",
"enum": [
"celsius",
"fahrenheit"
]
}
},
"required": [
"location",
"unit"
]
}
}
]
}'
return result
{
"id": "resp_0b4a74589255418c006a9bc7a4c324819681b55ba241860b44",
"metadata": {},
"model": "MaaS_GP_6_astra_20260903",
"output": [
{
"id": "msg_0b4a74589255418c006a9bc7a5bb248196a95735d73d57b4b8",
"type": "message",
"status": "completed",
"content": [
{
"type": "output_text",
"annotations": [],
"logprobs": [],
"text": "It’s currently sunny in Boston, with a temperature of **80°F (about 27°C)**."
}
],
"phase": "final_answer",
"role": "assistant"
}
],
"temperature": 1.0,
"tools": [
{
"type": "function",
"async": true,
"description": "Get the current weather in a given location",
"name": "get_current_weather",
"output_schema": null,
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA"
},
"unit": {
"type": "string",
"enum": [
"celsius",
"fahrenheit"
]
}
},
"required": [
"location",
"unit"
],
"additionalProperties": false
},
"strict": true
}
],
"background": false,
"reasoning": {
"mode": "standard",
"context": "all_turns",
"effort": "medium"
},
"status": "completed",
"text": {
"format": {
"type": "text"
},
"verbosity": "medium"
},
"truncation": "disabled",
"usage": {
"input_tokens": 248,
"input_tokens_details": {
"cached_tokens": 0,
"cache_write_tokens": 0
},
"output_tokens": 25,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 273
},
"store": true,
"created_at": 1788594084,
"object": "response",
"parallel_tool_calls": true,
"tool_choice": "auto",
"top_p": 0.98,
"completed_at": 1788594086,
"previous_response_id": "resp_0b4a74589255418c006a9bc6bd9c488196813cc4f322660063",
"prompt_cache_retention": "in_memory",
"service_tier": "default",
"top_logprobs": 0,
"presence_penalty": 0.0,
"frequency_penalty": 0.0
}