Skip to content

[DO NOT MERGE]: test cohere new#1141

Closed
harshiv-26 wants to merge 1 commit into
mainfrom
test-cohere
Closed

[DO NOT MERGE]: test cohere new#1141
harshiv-26 wants to merge 1 commit into
mainfrom
test-cohere

Conversation

@harshiv-26
Copy link
Copy Markdown
Collaborator

@harshiv-26 harshiv-26 commented May 21, 2026

Note

Low Risk
Low risk: a single config value type/format change with no logic modifications; only potential impact is on consumers that strictly parse numeric types.

Overview
Normalizes the Cohere model config in providers/cohere/command-a-plus-05-2026.yaml by changing costs.input_cost_per_token from 0 to 0.0.

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

@harshiv-26
Copy link
Copy Markdown
Collaborator Author

/test-models

@harshiv-26
Copy link
Copy Markdown
Collaborator Author

Gateway test results

  • Total: 8
  • Passed: 6
  • Failed: 0
  • Validation failed: 2
  • Errored: 0
  • Skipped: 0
  • Success rate: 75.0%
Provider Model Scenarios
cohere command-a-plus-05-2026 success: params:stream, params, tool-call, tool-call:stream, structured-output, structured-output:stream

validation_failure: reasoning:stream, reasoning
Failures (2)

cohere/command-a-plus-05-2026 — reasoning:stream (validation_failure)

Error:

Traceback (most recent call last):
  File "/tmp/tmpqacaou3e/snippet.py", line 35, in <module>
    raise Exception("VALIDATION FAILED: reasoning stream - no reasoning information in stream")
Exception: VALIDATION FAILED: reasoning stream - no reasoning information in stream
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-cohere/command-a-plus-05-2026",
    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")

cohere/command-a-plus-05-2026 — reasoning (validation_failure)

Error:

Traceback (most recent call last):
  File "/tmp/tmpggdw_0r0/snippet.py", line 43, in <module>
    raise Exception("VALIDATION FAILED: reasoning - no reasoning information in response")
Exception: VALIDATION FAILED: reasoning - no reasoning information in response
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-cohere/command-a-plus-05-2026",
    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")

@harshiv-26 harshiv-26 closed this May 21, 2026
@harshiv-26 harshiv-26 deleted the test-cohere branch May 21, 2026 11:28
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.

1 participant