Skip to content

fix(ark): expose Responses API model name on messages - #942

Open
jesseedcp wants to merge 1 commit into
cloudwego:mainfrom
jesseedcp:fix/ark-responses-model-name
Open

fix(ark): expose Responses API model name on messages#942
jesseedcp wants to merge 1 commit into
cloudwego:mainfrom
jesseedcp:fix/ark-responses-model-name

Conversation

@jesseedcp

Copy link
Copy Markdown

What type of PR is this?

fix

Check the PR title.

  • This PR title matches the format: <type>(optional scope): <description>
  • The description is user-oriented and clear.
  • No user documentation update is required; this makes the Responses API consistent with the existing Chat Completions message metadata.

(Optional) Translate the PR title into Chinese.

fix(ark): 在 Responses API 消息中暴露模型名称

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en:

The Ark Chat Completions path exposes the resolved model name on schema.Message through ark.GetModelName, while the Responses API currently reports it only through callback extra.

This change reuses the existing message-extra mechanism to preserve ResponseObject.Model on non-streaming output messages and streaming response metadata chunks. As a result, callers can retrieve the model name from both non-streaming messages and concatenated streaming messages through ark.GetModelName.

No public API or dependency changes are introduced.

Tests:

  • go test -gcflags="all=-N -l" ./...
  • go vet ./...
  • go test -race -gcflags="all=-N -l" . -run '^TestResponsesAPIChatModelPreservesModelName$' -count=1

(Optional) Which issue(s) this PR fixes:

Fixes #941

(optional) The PR that updates user documentation:

N/A

@CLAassistant

CLAassistant commented Aug 6, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@BrahmaMantra

Copy link
Copy Markdown

@hi-pender Sorry to bother you. Could you take a look at this PR and see if it makes sense? PTAL~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

ark: Responses API messages do not expose model name via ark.GetModelName

3 participants