Skip to content

docs(openai): fix AzureModelMapperFunc doc comment to match actual behavior - #948

Open
icn5381 wants to merge 1 commit into
cloudwego:mainfrom
icn5381:docs/939-azure-model-mapper-doc-mismatch
Open

docs(openai): fix AzureModelMapperFunc doc comment to match actual behavior#948
icn5381 wants to merge 1 commit into
cloudwego:mainfrom
icn5381:docs/939-azure-model-mapper-doc-mismatch

Conversation

@icn5381

@icn5381 icn5381 commented Aug 13, 2026

Copy link
Copy Markdown

References

References #939

Why

AzureModelMapperFunc's doc comment claims the default mapper strips [,:] (comma/colon) from the deployment name, but the actual default implementation in the underlying go-openai client strips [.:] (dot/colon). A caller passing a real Foundry deployment name containing a dot (e.g. gpt-5.6-luna) gets it silently rewritten, resulting in a 404 with no hint that the client transformed the name.

What changed

Fixed the doc comment in three places to say [.:] instead of [,:], matching what the code actually does:

  • libs/acl/openai/chat_model.go
  • components/model/openai/chatmodel.go
  • components/model/openai/README.md

This is a comment/doc-only change (option 2 from the issue's three suggestions) — the least controversial fix since it doesn't change runtime behavior, unlike options 1 (stop transforming by default) or 3 (add debug logging), which the maintainer hasn't weighed in on yet.

Surface area

  • Docs / tests / CI only

Validation

gofmt -l on the two changed .go files reports no issues. go build in the affected modules currently fails in this environment due to a pre-existing bytedance/sonic / Go 1.26 incompatibility unrelated to this change (comment-only edit, no code logic touched).

AI assistance

  • Tool(s) used: Claude Code
  • How you used it: AI helped locate all doc-comment occurrences of the mismatched regex description across the repo and drafted the fix.
  • Human verification: Read and understood every line of this change; confirmed via grep that all three occurrences of the stale [,:] comment were found and fixed consistently; confirmed the change is comment-only with no behavioral impact; take responsibility for this change.
  • I've read and understand every line of this change and take responsibility for it.

…havior

The doc comment said the default mapper strips [,:] (comma/colon) from
the deployment name, but the actual default in the underlying client
strips [.:] (dot/colon). This caused real deployment names containing
dots (e.g. "gpt-5.6-luna") to be silently rewritten and result in a
404, with the doc offering no hint why.

References cloudwego#939
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.

1 participant