feat(ark): WithExtraFields for Responses API request JSON#810
Open
jesse-engineer wants to merge 2 commits intocloudwego:mainfrom
Open
feat(ark): WithExtraFields for Responses API request JSON#810jesse-engineer wants to merge 2 commits intocloudwego:mainfrom
jesse-engineer wants to merge 2 commits intocloudwego:mainfrom
Conversation
- arkOptions.extraFields and WithExtraFields option - mergeResponsesRequestExtraJSON: shallow merge into wire JSON after preprocess - Generate/Stream/CreatePrefixCache use invokeCreateResponses* when extra set - go.mod replace volcengine-go-sdk to fork commit until upstream merges PR Depends-on: volcengine/volcengine-go-sdk#151 Made-with: Cursor
Remove local JSON merge; map WithExtraFields to SDK requestOption. Update replace pseudo-version for volcengine PR. Made-with: Cursor
c366592 to
13ba969
Compare
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.
Summary
Adds
ark.WithExtraFields(map[string]any)for ResponsesAPIChatModel, merging extra top-level keys into the serialized Responses API JSON after multimodal preprocessing. Same general idea asopenai.WithExtraFieldsin eino-ext.Implementation
mergeResponsesRequestExtraJSON,invokeCreateResponses,invokeCreateResponsesStream.Generate,Stream, andCreatePrefixCacheroute through these whenextraFieldsis non-empty.Dependency
Uses new arkruntime APIs from volcengine-go-sdk:
Until that PR is merged and released, this PR pins the ark submodule via:
After upstream volcengine merges, this PR should drop the
replaceand bumprequireto the released version.Tests
responses_merge_test.gofor merge behavior and option wiring.go test -gcflags="all=-N -l" ./...undercomponents/model/ark.Made with Cursor