feat(aws-bedrock-mantle/openai.gpt-5.6-sol): add new models [bot]#1756
Open
models-bot[bot] wants to merge 2 commits into
Open
feat(aws-bedrock-mantle/openai.gpt-5.6-sol): add new models [bot]#1756models-bot[bot] wants to merge 2 commits into
models-bot[bot] wants to merge 2 commits into
Conversation
Contributor
|
/test-models |
Collaborator
Gateway test results
Failures (8)
ErrorCode snippetfrom openai import OpenAI
client = OpenAI(api_key="***", base_url="https://internal.devtest.truefoundry.tech/api/llm")
tools = [
{
"type": "function",
"name": "get_weather",
"description": "Get the current weather for a location.",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city name, e.g. London",
},
},
"required": ["location"],
"additionalProperties": False,
},
"strict": True,
},
]
response = client.responses.create(
model="test-v2-aws-bedrock-mantle/openai.gpt-5.6-sol",
input=[
{"role": "user", "content": "Use the get_weather tool to check the weather in London. You must call the tool, do not respond with plain text."},
],
tools=tools,
tool_choice="auto",
stream=True,
)
_completed_response = None
for event in response:
if event.type == "response.output_text.delta":
print(event.delta, end="", flush=True)
if event.type == "response.completed":
_completed_response = event.response
if _completed_response is None:
raise Exception(
"VALIDATION FAILED: tool-call stream - no completed response received"
)
_tool_calls = [_item for _item in _completed_response.output if _item.type == "function_call"]
if not _tool_calls:
print(_completed_response.output_text)
print(f"Tools sent: {len(_completed_response.tools)}, tool_choice: {_completed_response.tool_choice}")
raise Exception(
"VALIDATION FAILED: tool-call stream - no tool calls in response"
)
for _tc in _tool_calls:
print(f"\nFunction: {_tc.name}")
print(f"Arguments: {_tc.arguments}")
print("\nVALIDATION: tool-call stream SUCCESS")
ErrorCode snippetfrom openai import OpenAI
client = OpenAI(api_key="***", base_url="https://internal.devtest.truefoundry.tech/api/llm")
response = client.responses.create(
model="test-v2-aws-bedrock-mantle/openai.gpt-5.6-sol",
input=[
{"role": "user", "content": "What is the capital of France?"},
],
stream=True,
)
for event in response:
if event.type == "response.output_text.delta":
print(event.delta, end="", flush=True)
ErrorCode snippetfrom openai import OpenAI
client = OpenAI(api_key="***", base_url="https://internal.devtest.truefoundry.tech/api/llm")
tools = [
{
"type": "function",
"name": "get_weather",
"description": "Get the current weather for a location.",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city name, e.g. London",
},
},
"required": ["location"],
"additionalProperties": False,
},
"strict": True,
},
]
response = client.responses.create(
model="test-v2-aws-bedrock-mantle/openai.gpt-5.6-sol",
input=[
{"role": "user", "content": "Use the get_weather tool to check the weather in London. You must call the tool, do not respond with plain text."},
],
tools=tools,
tool_choice="auto",
stream=False,
)
_tool_calls = [_item for _item in response.output if _item.type == "function_call"]
if not _tool_calls:
print(response.output_text)
print(f"Tools sent: {len(response.tools)}, tool_choice: {response.tool_choice}")
raise Exception(
"VALIDATION FAILED: tool-call - no tool calls in response"
)
for _tc in _tool_calls:
print(f"Function: {_tc.name}")
print(f"Arguments: {_tc.arguments}")
print("VALIDATION: tool-call SUCCESS")
ErrorCode snippetfrom openai import OpenAI
client = OpenAI(api_key="***", base_url="https://internal.devtest.truefoundry.tech/api/llm")
response = client.responses.create(
model="test-v2-aws-bedrock-mantle/openai.gpt-5.6-sol",
input=[
{"role": "user", "content": "How to calculate 3^3^3^3? Think step by step and show all reasoning."},
],
reasoning={"effort": "medium"},
stream=False,
)
_reasoning_items = [
_item for _item in (getattr(response, "output", None) or [])
if getattr(_item, "type", None) == "reasoning"
]
_usage = getattr(response, "usage", None)
_details = getattr(_usage, "output_tokens_details", None) if _usage else None
_reasoning_tokens = getattr(_details, "reasoning_tokens", 0) if _details else 0
if response.output_text:
print(response.output_text)
if not _reasoning_items and not _reasoning_tokens:
raise Exception(
"VALIDATION FAILED: reasoning - no reasoning output items or reasoning tokens in response"
)
print("VALIDATION: reasoning SUCCESS")
ErrorCode snippetfrom openai import OpenAI
import json
client = OpenAI(api_key="***", base_url="https://internal.devtest.truefoundry.tech/api/llm")
response_schema = json.loads('''{
"title": "CalendarEvent",
"type": "object",
"properties": {
"name": { "type": "string" },
"date": { "type": "string" },
"participants": {
"type": "array",
"items": { "type": "string" }
}
},
"required": ["name", "date", "participants"],
"additionalProperties": false
}''')
response = client.responses.create(
model="test-v2-aws-bedrock-mantle/openai.gpt-5.6-sol",
input=[
{"role": "user", "content": "Alice and Bob are going to a science fair on Friday. Extract the event details as JSON."},
],
text={"format": {"type": "json_schema", "name": "CalendarEvent", "strict": True, "schema": response_schema}},
stream=False,
)
import json as _json
_content = response.output_text
print(_content)
if not _content:
raise Exception("VALIDATION FAILED: structured-output - response content is empty")
_parsed = _json.loads(_content)
if "name" not in _parsed or "date" not in _parsed or "participants" not in _parsed:
raise Exception("VALIDATION FAILED: structured-output - missing expected fields (name, date, participants)")
if not isinstance(_parsed.get("participants"), list):
raise Exception("VALIDATION FAILED: structured-output - 'participants' is not a list, schema not enforced")
if set(_parsed.keys()) != {"name", "date", "participants"}:
raise Exception(
f"VALIDATION FAILED: structured-output - unexpected keys present: {set(_parsed.keys())}"
)
print("VALIDATION: structured-output SUCCESS")
ErrorCode snippetfrom openai import OpenAI
client = OpenAI(api_key="***", base_url="https://internal.devtest.truefoundry.tech/api/llm")
response = client.responses.create(
model="test-v2-aws-bedrock-mantle/openai.gpt-5.6-sol",
input=[
{"role": "user", "content": "How to calculate 3^3^3^3? Think step by step and show all reasoning."},
],
reasoning={"effort": "medium"},
stream=True,
)
_completed_response = None
for event in response:
if event.type == "response.output_text.delta":
print(event.delta, end="", flush=True)
if event.type == "response.completed":
_completed_response = event.response
if _completed_response is None:
raise Exception(
"VALIDATION FAILED: reasoning stream - no completed response received"
)
_reasoning_items = [
_item for _item in (getattr(_completed_response, "output", None) or [])
if getattr(_item, "type", None) == "reasoning"
]
_usage = getattr(_completed_response, "usage", None)
_details = getattr(_usage, "output_tokens_details", None) if _usage else None
_reasoning_tokens = getattr(_details, "reasoning_tokens", 0) if _details else 0
if not _reasoning_items and not _reasoning_tokens:
raise Exception(
"VALIDATION FAILED: reasoning stream - no reasoning output items or reasoning tokens in response"
)
print("\nVALIDATION: reasoning stream SUCCESS")
ErrorCode snippetfrom openai import OpenAI
import json
client = OpenAI(api_key="***", base_url="https://internal.devtest.truefoundry.tech/api/llm")
response_schema = json.loads('''{
"title": "CalendarEvent",
"type": "object",
"properties": {
"name": { "type": "string" },
"date": { "type": "string" },
"participants": {
"type": "array",
"items": { "type": "string" }
}
},
"required": ["name", "date", "participants"],
"additionalProperties": false
}''')
response = client.responses.create(
model="test-v2-aws-bedrock-mantle/openai.gpt-5.6-sol",
input=[
{"role": "user", "content": "Alice and Bob are going to a science fair on Friday. Extract the event details as JSON."},
],
text={"format": {"type": "json_schema", "name": "CalendarEvent", "strict": True, "schema": response_schema}},
stream=True,
)
import json as _json
_accumulated = ""
for event in response:
if event.type == "response.output_text.delta":
_accumulated += event.delta
print(event.delta, end="", flush=True)
if not _accumulated:
raise Exception("VALIDATION FAILED: structured-output stream - no content received")
_parsed = _json.loads(_accumulated)
if "name" not in _parsed or "date" not in _parsed or "participants" not in _parsed:
raise Exception("VALIDATION FAILED: structured-output stream - missing expected fields (name, date, participants)")
if not isinstance(_parsed.get("participants"), list):
raise Exception("VALIDATION FAILED: structured-output stream - 'participants' is not a list, schema not enforced")
if set(_parsed.keys()) != {"name", "date", "participants"}:
raise Exception(
f"VALIDATION FAILED: structured-output stream - unexpected keys present: {set(_parsed.keys())}"
)
print("\nVALIDATION: structured-output stream SUCCESS")
ErrorCode snippetfrom openai import OpenAI
client = OpenAI(api_key="***", base_url="https://internal.devtest.truefoundry.tech/api/llm")
response = client.responses.create(
model="test-v2-aws-bedrock-mantle/openai.gpt-5.6-sol",
input=[
{"role": "user", "content": "What is the capital of France?"},
],
stream=False,
)
print(response.output_text) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Auto-generated by model-addition-agent for
aws-bedrock-mantle/openai.gpt-5.6-sol.Note
Low Risk
Additive provider metadata only; no runtime or application logic changes.
Overview
Adds a new aws-bedrock-mantle provider entry for
openai.gpt-5.6-sol, registering the model as active with responses mode, serverless provisioning, and thinking enabled.The config defines per-region token pricing (us-east-1 and us-east-2), a 272k context window, text/image input, and capabilities including function calling, prompt caching, structured output, and tool choice. AWS documentation links are included as sources.
Reviewed by Cursor Bugbot for commit 7d8f545. Bugbot is set up for automated code reviews on this repo. Configure here.