Skip to content

feat(google-vertex/anthropic/claude-sonnet-5): add new models [bot]#1650

Merged
architkumar-truefoundry merged 4 commits into
mainfrom
bot/add-google-vertex-anthropic-claude-sonnet-5-20260701-000729
Jul 1, 2026
Merged

feat(google-vertex/anthropic/claude-sonnet-5): add new models [bot]#1650
architkumar-truefoundry merged 4 commits into
mainfrom
bot/add-google-vertex-anthropic-claude-sonnet-5-20260701-000729

Conversation

@models-bot

@models-bot models-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Auto-generated by model-addition-agent for google-vertex/anthropic/claude-sonnet-5.


Note

Low Risk
Metadata-only new model file with no runtime or routing code changes; incorrect pricing or limits would affect billing/routing config only.

Overview
Adds a new Google Vertex partner model definition for anthropic/claude-sonnet-5, registering it as an active serverless chat model with documentation source links.

The entry specifies 1M context, 128k max output (higher than existing Sonnet Vertex YAMLs at 64k), text/image/pdf inputs, and standard Anthropic-on-Vertex capabilities (tools, prompt caching, structured output, etc.). It includes regional token and cache pricing for us, global, and eu, enables extended thinking (thinking: true plus a JSON thinking param), and strips temperature from exposed params alongside top_k and max_tokens bounds.

Reviewed by Cursor Bugbot for commit b8d16e7. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

/test-models

@harshiv-26

Copy link
Copy Markdown
Collaborator

Gateway test results

  • Total: 10
  • Passed: 0
  • Failed: 10
  • Validation failed: 0
  • Errored: 0
  • Skipped: 0
  • Success rate: 0.0%
Provider Model Scenarios
google-vertex anthropic/claude-sonnet-5 failure: tool-call, structured-output:stream, parallel-tool-call, params, reasoning:stream, params:stream, structured-output, reasoning, parallel-tool-call:stream, tool-call:stream
Failures (10)

google-vertex/anthropic/claude-sonnet-5 — tool-call (failure)

Error
Traceback (most recent call last):
  File "/tmp/tmplsmfe01y/snippet.py", line 27, in <module>
    response = client.chat.completions.create(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_utils/_utils.py", line 286, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/resources/chat/completions/completions.py", line 1147, in create
    return self._post(
           ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1259, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1047, in request
    raise self._make_status_error_from_response(err.response) from None
openai.NotFoundError: Error code: 404 - {'status': 'failure', 'message': 'vertex error: Publisher model `projects/truefoundry-devtest/locations/global/publishers/anthropic/models/claude-sonnet-5` was not found or your project does not have access to it. Ensure you are using a valid model name and that the model is available in the specified region. For more information, see: https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/locations.', 'error': {'message': 'vertex error: Publisher model `projects/truefoundry-devtest/locations/global/publishers/anthropic/models/claude-sonnet-5` was not found or your project does not have access to it. Ensure you are using a valid model name and that the model is available in the specified region. For more information, see: https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/locations.', 'type': 'APIError', 'code': '404'}, 'error_origin_level': 'api_error', 'provider': 'google-vertex'}
Code snippet
from openai import OpenAI

client = OpenAI(api_key="***", base_url="https://internal.devtest.truefoundry.tech/api/llm")

tools = [
    {
        "type": "function",
        "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.chat.completions.create(
    model="test-v2-vertex/anthropic-claude-sonnet-5",
    messages=[
        {"role": "system", "content": "You are a helpful assistant with access to tools. You MUST strictly use the provided tools to answer. Never respond with plain text when a tool is available."},
        {"role": "user", "content": "Hi"},
        {"role": "assistant", "content": "Hi, how can I help you"},
        {"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,
)
_message = response.choices[0].message
if _message.tool_calls:
    for _tc in _message.tool_calls:
        print(f"Function: {_tc.function.name}")
        print(f"Arguments: {_tc.function.arguments}")
else:
    print(_message.content)

if not _message.tool_calls or len(_message.tool_calls) == 0:
    raise Exception("VALIDATION FAILED: tool-call - no tool calls in response")
print("VALIDATION: tool-call SUCCESS")

google-vertex/anthropic/claude-sonnet-5 — structured-output:stream (failure)

Error
Traceback (most recent call last):
  File "/tmp/tmp_zy97ni_/snippet.py", line 21, in <module>
    response = client.chat.completions.create(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_utils/_utils.py", line 286, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/resources/chat/completions/completions.py", line 1147, in create
    return self._post(
           ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1259, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1047, in request
    raise self._make_status_error_from_response(err.response) from None
openai.NotFoundError: Error code: 404 - {'status': 'failure', 'message': 'Invalid response received from vertex: [{"error":{"code":404,"message":"Publisher model `projects/truefoundry-devtest/locations/global/publishers/anthropic/models/claude-sonnet-5` was not found or your project does not have access to it. Ensure you are using a valid model name and that the model is available in the specified region. For more information, see: https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/locations.","status":"NOT_FOUND"}}]', 'error': {'message': 'Invalid response received from vertex: [{"error":{"code":404,"message":"Publisher model `projects/truefoundry-devtest/locations/global/publishers/anthropic/models/claude-sonnet-5` was not found or your project does not have access to it. Ensure you are using a valid model name and that the model is available in the specified region. For more information, see: https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/locations.","status":"NOT_FOUND"}}]', 'type': 'APIError', 'code': '404'}, 'error_origin_level': 'api_error', 'provider': 'google-vertex'}
Code snippet
from 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.chat.completions.create(
    model="test-v2-vertex/anthropic-claude-sonnet-5",
    messages=[
        {"role": "system", "content": "Extract the event information as JSON."},
        {"role": "user", "content": "Hi"},
        {"role": "assistant", "content": "Hi, how can I help you"},
        {"role": "user", "content": "Alice and Bob are going to a science fair on Friday. Extract the event details as JSON."},
    ],
    response_format={"type": "json_schema", "json_schema": {"name": "CalendarEvent", "schema": response_schema}},
    stream=True,
)
import json as _json

_accumulated = ""
for chunk in response:
    if chunk.choices and len(chunk.choices) > 0:
        delta = chunk.choices[0].delta
        if delta.content is not None:
            _accumulated += delta.content
            print(delta.content, 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")

google-vertex/anthropic/claude-sonnet-5 — parallel-tool-call (failure)

Error
Traceback (most recent call last):
  File "/tmp/tmpux3lsdd2/snippet.py", line 27, in <module>
    response = client.chat.completions.create(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_utils/_utils.py", line 286, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/resources/chat/completions/completions.py", line 1147, in create
    return self._post(
           ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1259, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1047, in request
    raise self._make_status_error_from_response(err.response) from None
openai.NotFoundError: Error code: 404 - {'status': 'failure', 'message': 'vertex error: Publisher model `projects/truefoundry-devtest/locations/global/publishers/anthropic/models/claude-sonnet-5` was not found or your project does not have access to it. Ensure you are using a valid model name and that the model is available in the specified region. For more information, see: https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/locations.', 'error': {'message': 'vertex error: Publisher model `projects/truefoundry-devtest/locations/global/publishers/anthropic/models/claude-sonnet-5` was not found or your project does not have access to it. Ensure you are using a valid model name and that the model is available in the specified region. For more information, see: https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/locations.', 'type': 'APIError', 'code': '404'}, 'error_origin_level': 'api_error', 'provider': 'google-vertex'}
Code snippet
from openai import OpenAI

client = OpenAI(api_key="***", base_url="https://internal.devtest.truefoundry.tech/api/llm")

tools = [
    {
        "type": "function",
        "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.chat.completions.create(
    model="test-v2-vertex/anthropic-claude-sonnet-5",
    messages=[
        {"role": "system", "content": "You are a helpful assistant with access to tools. You MUST strictly call multiple tools in parallel whenever possible. Never call them sequentially."},
        {"role": "user", "content": "Hi"},
        {"role": "assistant", "content": "Hi, how can I help you"},
        {"role": "user", "content": "Use the get_weather tool to check the weather in London and Paris. You MUST make both tool calls strictly in parallel, not sequentially."},
    ],
    tools=tools,
    tool_choice="auto",
    parallel_tool_calls=True,
    stream=False,
)
_message = response.choices[0].message
if _message.tool_calls:
    print(f"Number of parallel tool calls: {len(_message.tool_calls)}")
    for _tc in _message.tool_calls:
        print(f"Function: {_tc.function.name}")
        print(f"Arguments: {_tc.function.arguments}")
else:
    print(_message.content)

if not _message.tool_calls or len(_message.tool_calls) < 1:
    raise Exception(
        f"VALIDATION FAILED: parallel-tool-call - expected at least 1 tool call, "
        f"got {len(_message.tool_calls) if _message.tool_calls else 0}"
    )
print("VALIDATION: parallel-tool-call SUCCESS")

google-vertex/anthropic/claude-sonnet-5 — params (failure)

Error
Traceback (most recent call last):
  File "/tmp/tmp64j65gbw/snippet.py", line 5, in <module>
    response = client.chat.completions.create(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_utils/_utils.py", line 286, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/resources/chat/completions/completions.py", line 1147, in create
    return self._post(
           ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1259, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1047, in request
    raise self._make_status_error_from_response(err.response) from None
openai.NotFoundError: Error code: 404 - {'status': 'failure', 'message': 'vertex error: Publisher model `projects/truefoundry-devtest/locations/global/publishers/anthropic/models/claude-sonnet-5` was not found or your project does not have access to it. Ensure you are using a valid model name and that the model is available in the specified region. For more information, see: https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/locations.', 'error': {'message': 'vertex error: Publisher model `projects/truefoundry-devtest/locations/global/publishers/anthropic/models/claude-sonnet-5` was not found or your project does not have access to it. Ensure you are using a valid model name and that the model is available in the specified region. For more information, see: https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/locations.', 'type': 'APIError', 'code': '404'}, 'error_origin_level': 'api_error', 'provider': 'google-vertex'}
Code snippet
from openai import OpenAI

client = OpenAI(api_key="***", base_url="https://internal.devtest.truefoundry.tech/api/llm")

response = client.chat.completions.create(
    model="test-v2-vertex/anthropic-claude-sonnet-5",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hi"},
        {"role": "assistant", "content": "Hi, how can I help you"},
        {"role": "user", "content": "What is the capital of France?"},
    ],
    max_tokens=256,
    temperature=0.7,
    stream=False,
)

print(response.choices[0].message.content)

google-vertex/anthropic/claude-sonnet-5 — reasoning:stream (failure)

Error
Traceback (most recent call last):
  File "/tmp/tmpnaxj18bf/snippet.py", line 5, in <module>
    response = client.chat.completions.create(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_utils/_utils.py", line 286, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/resources/chat/completions/completions.py", line 1147, in create
    return self._post(
           ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1259, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1047, in request
    raise self._make_status_error_from_response(err.response) from None
openai.NotFoundError: Error code: 404 - {'status': 'failure', 'message': 'Invalid response received from vertex: [{"error":{"code":404,"message":"Publisher model `projects/truefoundry-devtest/locations/global/publishers/anthropic/models/claude-sonnet-5` was not found or your project does not have access to it. Ensure you are using a valid model name and that the model is available in the specified region. For more information, see: https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/locations.","status":"NOT_FOUND"}}]', 'error': {'message': 'Invalid response received from vertex: [{"error":{"code":404,"message":"Publisher model `projects/truefoundry-devtest/locations/global/publishers/anthropic/models/claude-sonnet-5` was not found or your project does not have access to it. Ensure you are using a valid model name and that the model is available in the specified region. For more information, see: https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/locations.","status":"NOT_FOUND"}}]', 'type': 'APIError', 'code': '404'}, 'error_origin_level': 'api_error', 'provider': 'google-vertex'}
Code snippet
from openai import OpenAI

client = OpenAI(api_key="***", base_url="https://internal.devtest.truefoundry.tech/api/llm")

response = client.chat.completions.create(
    model="test-v2-vertex/anthropic-claude-sonnet-5",
    messages=[
        {"role": "system", "content": "You are a helpful assistant. You MUST think step by step and show your reasoning. Never skip reasoning steps."},
        {"role": "user", "content": "Hi"},
        {"role": "assistant", "content": "Hi, how can I help you"},
        {"role": "user", "content": "How to calculate 3^3^3^3? Think step by step and show all reasoning."},
    ],
    reasoning_effort="medium",
    stream=True,
)
_reasoning_detected = False
for chunk in response:
    if chunk.choices and len(chunk.choices) > 0:
        delta = chunk.choices[0].delta
        if delta.content is not None:
            print(delta.content, end="", flush=True)
        if getattr(delta, "reasoning_content", None) is not None:
            _reasoning_detected = True
        if getattr(delta, "reasoning", None) is not None:
            _reasoning_detected = True

    _usage = getattr(chunk, "usage", None)
    if _usage is not None:
        _details = getattr(_usage, "completion_tokens_details", None)
        if _details and getattr(_details, "reasoning_tokens", 0) > 0:
            _reasoning_detected = True

if not _reasoning_detected:
    raise Exception("VALIDATION FAILED: reasoning stream - no reasoning information in stream")
print("\nVALIDATION: reasoning stream SUCCESS")

google-vertex/anthropic/claude-sonnet-5 — params:stream (failure)

Error
Traceback (most recent call last):
  File "/tmp/tmpjyin70h2/snippet.py", line 5, in <module>
    response = client.chat.completions.create(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_utils/_utils.py", line 286, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/resources/chat/completions/completions.py", line 1147, in create
    return self._post(
           ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1259, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1047, in request
    raise self._make_status_error_from_response(err.response) from None
openai.NotFoundError: Error code: 404 - {'status': 'failure', 'message': 'Invalid response received from vertex: [{"error":{"code":404,"message":"Publisher model `projects/truefoundry-devtest/locations/global/publishers/anthropic/models/claude-sonnet-5` was not found or your project does not have access to it. Ensure you are using a valid model name and that the model is available in the specified region. For more information, see: https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/locations.","status":"NOT_FOUND"}}]', 'error': {'message': 'Invalid response received from vertex: [{"error":{"code":404,"message":"Publisher model `projects/truefoundry-devtest/locations/global/publishers/anthropic/models/claude-sonnet-5` was not found or your project does not have access to it. Ensure you are using a valid model name and that the model is available in the specified region. For more information, see: https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/locations.","status":"NOT_FOUND"}}]', 'type': 'APIError', 'code': '404'}, 'error_origin_level': 'api_error', 'provider': 'google-vertex'}
Code snippet
from openai import OpenAI

client = OpenAI(api_key="***", base_url="https://internal.devtest.truefoundry.tech/api/llm")

response = client.chat.completions.create(
    model="test-v2-vertex/anthropic-claude-sonnet-5",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hi"},
        {"role": "assistant", "content": "Hi, how can I help you"},
        {"role": "user", "content": "What is the capital of France?"},
    ],
    max_tokens=256,
    temperature=0.7,
    stream=True,
)

for chunk in response:
    if chunk.choices and len(chunk.choices) > 0:
        delta = chunk.choices[0].delta
        if delta.content is not None:
            print(delta.content, end="", flush=True)

google-vertex/anthropic/claude-sonnet-5 — structured-output (failure)

Error
Traceback (most recent call last):
  File "/tmp/tmpz_zyin6f/snippet.py", line 21, in <module>
    response = client.chat.completions.create(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_utils/_utils.py", line 286, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/resources/chat/completions/completions.py", line 1147, in create
    return self._post(
           ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1259, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1047, in request
    raise self._make_status_error_from_response(err.response) from None
openai.NotFoundError: Error code: 404 - {'status': 'failure', 'message': 'vertex error: Publisher model `projects/truefoundry-devtest/locations/global/publishers/anthropic/models/claude-sonnet-5` was not found or your project does not have access to it. Ensure you are using a valid model name and that the model is available in the specified region. For more information, see: https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/locations.', 'error': {'message': 'vertex error: Publisher model `projects/truefoundry-devtest/locations/global/publishers/anthropic/models/claude-sonnet-5` was not found or your project does not have access to it. Ensure you are using a valid model name and that the model is available in the specified region. For more information, see: https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/locations.', 'type': 'APIError', 'code': '404'}, 'error_origin_level': 'api_error', 'provider': 'google-vertex'}
Code snippet
from 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.chat.completions.create(
    model="test-v2-vertex/anthropic-claude-sonnet-5",
    messages=[
        {"role": "system", "content": "Extract the event information as JSON."},
        {"role": "user", "content": "Hi"},
        {"role": "assistant", "content": "Hi, how can I help you"},
        {"role": "user", "content": "Alice and Bob are going to a science fair on Friday. Extract the event details as JSON."},
    ],
    response_format={"type": "json_schema", "json_schema": {"name": "CalendarEvent", "schema": response_schema}},
    stream=False,
)
import json as _json

_content = response.choices[0].message.content
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")

google-vertex/anthropic/claude-sonnet-5 — reasoning (failure)

Error
Traceback (most recent call last):
  File "/tmp/tmp_uoyuboi/snippet.py", line 5, in <module>
    response = client.chat.completions.create(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_utils/_utils.py", line 286, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/resources/chat/completions/completions.py", line 1147, in create
    return self._post(
           ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1259, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1047, in request
    raise self._make_status_error_from_response(err.response) from None
openai.NotFoundError: Error code: 404 - {'status': 'failure', 'message': 'vertex error: Publisher model `projects/truefoundry-devtest/locations/global/publishers/anthropic/models/claude-sonnet-5` was not found or your project does not have access to it. Ensure you are using a valid model name and that the model is available in the specified region. For more information, see: https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/locations.', 'error': {'message': 'vertex error: Publisher model `projects/truefoundry-devtest/locations/global/publishers/anthropic/models/claude-sonnet-5` was not found or your project does not have access to it. Ensure you are using a valid model name and that the model is available in the specified region. For more information, see: https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/locations.', 'type': 'APIError', 'code': '404'}, 'error_origin_level': 'api_error', 'provider': 'google-vertex'}
Code snippet
from openai import OpenAI

client = OpenAI(api_key="***", base_url="https://internal.devtest.truefoundry.tech/api/llm")

response = client.chat.completions.create(
    model="test-v2-vertex/anthropic-claude-sonnet-5",
    messages=[
        {"role": "system", "content": "You are a helpful assistant. You MUST think step by step and show your reasoning. Never skip reasoning steps."},
        {"role": "user", "content": "Hi"},
        {"role": "assistant", "content": "Hi, how can I help you"},
        {"role": "user", "content": "How to calculate 3^3^3^3? Think step by step and show all reasoning."},
    ],
    reasoning_effort="medium",
    stream=False,
)
_usage = getattr(response, "usage", None)
_reasoning_detected = False

_choices = getattr(response, "choices", None)
if _choices and len(_choices) > 0:
    _message = getattr(_choices[0], "message", None)
else:
    _message = None

if _message and getattr(_message, "content", None) is not None:
    print(_message.content)

if _usage is not None:
    _output_token_details = getattr(_usage, "completion_tokens_details", None)
    if _output_token_details and getattr(_output_token_details, "reasoning_tokens", 0) > 0:
        _reasoning_detected = True
    elif getattr(_usage, "reasoning", None) is not None:
        _reasoning_detected = True

if getattr(_message, "reasoning_content", None) is not None:
    _reasoning_detected = True
elif getattr(_message, "reasoning", None) is not None:
    _reasoning_detected = True

if not _reasoning_detected:
    print("Response: ", response)
    raise Exception("VALIDATION FAILED: reasoning - no reasoning information in response")
print("VALIDATION: reasoning SUCCESS")

google-vertex/anthropic/claude-sonnet-5 — parallel-tool-call:stream (failure)

Error
Traceback (most recent call last):
  File "/tmp/tmp7dd3m2i0/snippet.py", line 27, in <module>
    response = client.chat.completions.create(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_utils/_utils.py", line 286, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/resources/chat/completions/completions.py", line 1147, in create
    return self._post(
           ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1259, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1047, in request
    raise self._make_status_error_from_response(err.response) from None
openai.NotFoundError: Error code: 404 - {'status': 'failure', 'message': 'Invalid response received from vertex: [{"error":{"code":404,"message":"Publisher model `projects/truefoundry-devtest/locations/global/publishers/anthropic/models/claude-sonnet-5` was not found or your project does not have access to it. Ensure you are using a valid model name and that the model is available in the specified region. For more information, see: https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/locations.","status":"NOT_FOUND"}}]', 'error': {'message': 'Invalid response received from vertex: [{"error":{"code":404,"message":"Publisher model `projects/truefoundry-devtest/locations/global/publishers/anthropic/models/claude-sonnet-5` was not found or your project does not have access to it. Ensure you are using a valid model name and that the model is available in the specified region. For more information, see: https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/locations.","status":"NOT_FOUND"}}]', 'type': 'APIError', 'code': '404'}, 'error_origin_level': 'api_error', 'provider': 'google-vertex'}
Code snippet
from openai import OpenAI

client = OpenAI(api_key="***", base_url="https://internal.devtest.truefoundry.tech/api/llm")

tools = [
    {
        "type": "function",
        "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.chat.completions.create(
    model="test-v2-vertex/anthropic-claude-sonnet-5",
    messages=[
        {"role": "system", "content": "You are a helpful assistant with access to tools. You MUST strictly call multiple tools in parallel whenever possible. Never call them sequentially."},
        {"role": "user", "content": "Hi"},
        {"role": "assistant", "content": "Hi, how can I help you"},
        {"role": "user", "content": "Use the get_weather tool to check the weather in London and Paris. You MUST make both tool calls strictly in parallel, not sequentially."},
    ],
    tools=tools,
    tool_choice="auto",
    parallel_tool_calls=True,
    stream=True,
)
_tool_call_indices = set()
for chunk in response:
    if chunk.choices and len(chunk.choices) > 0:
        delta = chunk.choices[0].delta
        if delta.content is not None:
            print(delta.content, end="", flush=True)
        if delta.tool_calls:
            for _tc in delta.tool_calls:
                _tool_call_indices.add(_tc.index)
                if _tc.function:
                    print(_tc.function.arguments or "", end="", flush=True)

if len(_tool_call_indices) < 1:
    raise Exception(
        f"VALIDATION FAILED: parallel-tool-call stream - expected at least 1 tool call, "
        f"got {len(_tool_call_indices)}"
    )
print(f"\nNumber of parallel tool calls: {len(_tool_call_indices)}")
print("VALIDATION: parallel-tool-call stream SUCCESS")

google-vertex/anthropic/claude-sonnet-5 — tool-call:stream (failure)

Error
Traceback (most recent call last):
  File "/tmp/tmp_s9b3oan/snippet.py", line 27, in <module>
    response = client.chat.completions.create(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_utils/_utils.py", line 286, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/resources/chat/completions/completions.py", line 1147, in create
    return self._post(
           ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1259, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1047, in request
    raise self._make_status_error_from_response(err.response) from None
openai.NotFoundError: Error code: 404 - {'status': 'failure', 'message': 'Invalid response received from vertex: [{"error":{"code":404,"message":"Publisher model `projects/truefoundry-devtest/locations/global/publishers/anthropic/models/claude-sonnet-5` was not found or your project does not have access to it. Ensure you are using a valid model name and that the model is available in the specified region. For more information, see: https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/locations.","status":"NOT_FOUND"}}]', 'error': {'message': 'Invalid response received from vertex: [{"error":{"code":404,"message":"Publisher model `projects/truefoundry-devtest/locations/global/publishers/anthropic/models/claude-sonnet-5` was not found or your project does not have access to it. Ensure you are using a valid model name and that the model is available in the specified region. For more information, see: https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/locations.","status":"NOT_FOUND"}}]', 'type': 'APIError', 'code': '404'}, 'error_origin_level': 'api_error', 'provider': 'google-vertex'}
Code snippet
from openai import OpenAI

client = OpenAI(api_key="***", base_url="https://internal.devtest.truefoundry.tech/api/llm")

tools = [
    {
        "type": "function",
        "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.chat.completions.create(
    model="test-v2-vertex/anthropic-claude-sonnet-5",
    messages=[
        {"role": "system", "content": "You are a helpful assistant with access to tools. You MUST strictly use the provided tools to answer. Never respond with plain text when a tool is available."},
        {"role": "user", "content": "Hi"},
        {"role": "assistant", "content": "Hi, how can I help you"},
        {"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,
)
_tool_calls_made = False
for chunk in response:
    if chunk.choices and len(chunk.choices) > 0:
        delta = chunk.choices[0].delta
        if delta.content is not None:
            print(delta.content, end="", flush=True)
        if delta.tool_calls:
            _tool_calls_made = True
            for _tc in delta.tool_calls:
                if _tc.function:
                    print(_tc.function.arguments or "", end="", flush=True)

if not _tool_calls_made:
    raise Exception("VALIDATION FAILED: tool-call stream - no tool calls received")
print("\nVALIDATION: tool-call stream SUCCESS")

Comment thread providers/google-vertex/anthropic/claude-sonnet-5.yaml
Comment thread providers/google-vertex/anthropic/claude-sonnet-5.yaml
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

/test-models

Comment thread providers/google-vertex/anthropic/claude-sonnet-5.yaml
@harshiv-26

Copy link
Copy Markdown
Collaborator

Gateway test results

  • Total: 10
  • Passed: 8
  • Failed: 2
  • Validation failed: 0
  • Errored: 0
  • Skipped: 0
  • Success rate: 80.0%
Provider Model Scenarios
google-vertex anthropic/claude-sonnet-5 success: tool-call:stream, parallel-tool-call, structured-output:stream, structured-output, parallel-tool-call:stream, tool-call, reasoning, reasoning:stream

failure: params:stream, params
Failures (2)

google-vertex/anthropic/claude-sonnet-5 — params:stream (failure)

Error
Traceback (most recent call last):
  File "/tmp/tmpnpakh4vb/snippet.py", line 5, in <module>
    response = client.chat.completions.create(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_utils/_utils.py", line 286, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/resources/chat/completions/completions.py", line 1147, in create
    return self._post(
           ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1259, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1047, in request
    raise self._make_status_error_from_response(err.response) from None
openai.BadRequestError: Error code: 400 - {'status': 'failure', 'message': 'vertex error: `temperature` is deprecated for this model.', 'error': {'message': 'vertex error: `temperature` is deprecated for this model.', 'type': 'APIError', 'code': '400'}, 'error_origin_level': 'api_error', 'provider': 'google-vertex'}
Code snippet
from openai import OpenAI

client = OpenAI(api_key="***", base_url="https://internal.devtest.truefoundry.tech/api/llm")

response = client.chat.completions.create(
    model="test-v2-vertex/anthropic-claude-sonnet-5",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hi"},
        {"role": "assistant", "content": "Hi, how can I help you"},
        {"role": "user", "content": "What is the capital of France?"},
    ],
    max_tokens=256,
    temperature=0.7,
    stream=True,
)

for chunk in response:
    if chunk.choices and len(chunk.choices) > 0:
        delta = chunk.choices[0].delta
        if delta.content is not None:
            print(delta.content, end="", flush=True)

google-vertex/anthropic/claude-sonnet-5 — params (failure)

Error
Traceback (most recent call last):
  File "/tmp/tmpqy8nfotm/snippet.py", line 5, in <module>
    response = client.chat.completions.create(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_utils/_utils.py", line 286, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/resources/chat/completions/completions.py", line 1147, in create
    return self._post(
           ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1259, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1047, in request
    raise self._make_status_error_from_response(err.response) from None
openai.BadRequestError: Error code: 400 - {'status': 'failure', 'message': 'vertex error: `temperature` is deprecated for this model.', 'error': {'message': 'vertex error: `temperature` is deprecated for this model.', 'type': 'APIError', 'code': '400'}, 'error_origin_level': 'api_error', 'provider': 'google-vertex'}
Code snippet
from openai import OpenAI

client = OpenAI(api_key="***", base_url="https://internal.devtest.truefoundry.tech/api/llm")

response = client.chat.completions.create(
    model="test-v2-vertex/anthropic-claude-sonnet-5",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hi"},
        {"role": "assistant", "content": "Hi, how can I help you"},
        {"role": "user", "content": "What is the capital of France?"},
    ],
    max_tokens=256,
    temperature=0.7,
    stream=False,
)

print(response.choices[0].message.content)
Successes (8)

google-vertex/anthropic/claude-sonnet-5 — tool-call:stream (success)

Output
{"location": "London"}
VALIDATION: tool-call stream SUCCESS

google-vertex/anthropic/claude-sonnet-5 — parallel-tool-call (success)

Output
Number of parallel tool calls: 2
Function: get_weather
Arguments: {"location":"London"}
Function: get_weather
Arguments: {"location":"Paris"}
VALIDATI
... (truncated, 31 chars omitted)

google-vertex/anthropic/claude-sonnet-5 — structured-output:stream (success)

Output
{"name": "Science Fair", "date": "Friday", "participants": ["Alice","Bob"]}
VALIDATION: structured-output stream SUCCESS

google-vertex/anthropic/claude-sonnet-5 — structured-output (success)

Output
{"name":"Science Fair","date":"Friday","participants":["Alice","Bob"]}
VALIDATION: structured-output SUCCESS

google-vertex/anthropic/claude-sonnet-5 — parallel-tool-call:stream (success)

Output
{"location": "London"}{"location": "Paris"}
Number of parallel tool calls: 2
VALIDATION: parallel-tool-call stream SUCCESS

google-vertex/anthropic/claude-sonnet-5 — tool-call (success)

Output
Function: get_weather
Arguments: {"location":"London"}
VALIDATION: tool-call SUCCESS

google-vertex/anthropic/claude-sonnet-5 — reasoning (success)

Output
# Calculating 3^3^3^3

## Step 1: Establish the convention
Exponentiation is **right-associative**, meaning towers of exponents are evaluated from the
... (truncated, 858 chars omitted)

google-vertex/anthropic/claude-sonnet-5 — reasoning:stream (success)

Output
# Calculating 3^3^3^3 Step by Step

## Step 1: Establish the Convention
Exponentiation towers are evaluated **right-to-left** (right-associative). Thi
... (truncated, 526 chars omitted)

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

/test-models

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b8d16e7. Configure here.

Comment thread providers/google-vertex/anthropic/claude-sonnet-5.yaml
@harshiv-26

Copy link
Copy Markdown
Collaborator

Gateway test results

  • Total: 10
  • Passed: 10
  • Failed: 0
  • Validation failed: 0
  • Errored: 0
  • Skipped: 0
  • Success rate: 100.0%
Provider Model Scenarios
google-vertex anthropic/claude-sonnet-5 success: params:stream, tool-call:stream, structured-output, tool-call, parallel-tool-call:stream, parallel-tool-call, structured-output:stream, params, reasoning, reasoning:stream
Successes (10)

google-vertex/anthropic/claude-sonnet-5 — params:stream (success)

Output
The capital of France is **Paris**.

google-vertex/anthropic/claude-sonnet-5 — tool-call:stream (success)

Output
{"location": "London"}
VALIDATION: tool-call stream SUCCESS

google-vertex/anthropic/claude-sonnet-5 — structured-output (success)

Output
{"name":"Science Fair","date":"Friday","participants":["Alice","Bob"]}
VALIDATION: structured-output SUCCESS

google-vertex/anthropic/claude-sonnet-5 — tool-call (success)

Output
Function: get_weather
Arguments: {"location":"London"}
VALIDATION: tool-call SUCCESS

google-vertex/anthropic/claude-sonnet-5 — parallel-tool-call:stream (success)

Output
{"location": "London"}{"location": "Paris"}
Number of parallel tool calls: 2
VALIDATION: parallel-tool-call stream SUCCESS

google-vertex/anthropic/claude-sonnet-5 — parallel-tool-call (success)

Output
Number of parallel tool calls: 2
Function: get_weather
Arguments: {"location":"London"}
Function: get_weather
Arguments: {"location":"Paris"}
VALIDATI
... (truncated, 31 chars omitted)

google-vertex/anthropic/claude-sonnet-5 — structured-output:stream (success)

Output
{"name": "Science Fair", "date": "Friday", "participants": ["Alice","Bob"]}
VALIDATION: structured-output stream SUCCESS

google-vertex/anthropic/claude-sonnet-5 — params (success)

Output
The capital of France is **Paris**.

google-vertex/anthropic/claude-sonnet-5 — reasoning (success)

Output
# Calculating 3^3^3^3

## Step 1: Establish the Order of Operations

Exponentiation is **right-associative**, meaning we evaluate from the top (right)
... (truncated, 1877 chars omitted)

google-vertex/anthropic/claude-sonnet-5 — reasoning:stream (success)

Output
# Calculating 3^3^3^3 Step by Step

## Step 1: Establish the Convention
First, I need to clarify how this expression should be evaluated. Exponentiati
... (truncated, 2139 chars omitted)

@architkumar-truefoundry
architkumar-truefoundry merged commit f91aa32 into main Jul 1, 2026
8 checks passed
@architkumar-truefoundry
architkumar-truefoundry deleted the bot/add-google-vertex-anthropic-claude-sonnet-5-20260701-000729 branch July 1, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants