docs(openai): fix AzureModelMapperFunc doc comment to match actual behavior - #948
Open
icn5381 wants to merge 1 commit into
Open
docs(openai): fix AzureModelMapperFunc doc comment to match actual behavior#948icn5381 wants to merge 1 commit into
icn5381 wants to merge 1 commit into
Conversation
…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
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.
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 underlyinggo-openaiclient 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.gocomponents/model/openai/chatmodel.gocomponents/model/openai/README.mdThis 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
Validation
gofmt -lon the two changed.gofiles reports no issues.go buildin the affected modules currently fails in this environment due to a pre-existingbytedance/sonic/ Go 1.26 incompatibility unrelated to this change (comment-only edit, no code logic touched).AI assistance
grepthat 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.