Skip to content

Commit 2de19de

Browse files
committed
Add FieldExtraArgs constant for extra_args wire key
Signed-off-by: Revital Sur <eres@il.ibm.com>
1 parent af8ac45 commit 2de19de

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

pkg/common/request/constants.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const (
2424
FieldMaxOutputTokens = "max_output_tokens" // Used by Responses API
2525
FieldMinTokens = "min_tokens"
2626
FieldSamplingParams = "sampling_params"
27+
FieldExtraArgs = "extra_args"
2728
FieldDoRemotePrefill = "do_remote_prefill"
2829
FieldDoRemoteDecode = "do_remote_decode"
2930
FieldRemoteBlockIDs = "remote_block_ids"

pkg/coordinator/steps/decode.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ func (s *DecodeStep) prepareDecodeBody(ctx context.Context, reqCtx *pipeline.Req
111111
sampling = map[string]any{}
112112
reqCtx.Body[reqcommon.FieldSamplingParams] = sampling
113113
}
114-
extraArgs, ok := sampling["extra_args"].(map[string]any)
114+
extraArgs, ok := sampling[reqcommon.FieldExtraArgs].(map[string]any)
115115
if !ok {
116116
extraArgs = map[string]any{}
117-
sampling["extra_args"] = extraArgs
117+
sampling[reqcommon.FieldExtraArgs] = extraArgs
118118
}
119119
extraArgs[reqcommon.FieldKVTransferParams] = kvParams
120120
}

pkg/coordinator/steps/prefill.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ func (s *PrefillStep) buildPrefillBody(ctx context.Context, reqCtx *pipeline.Req
190190
"model": reqCtx.Model,
191191
reqcommon.FieldSamplingParams: map[string]any{
192192
reqcommon.FieldMaxTokens: 1,
193-
"extra_args": extraArgs,
193+
reqcommon.FieldExtraArgs: extraArgs,
194194
},
195195
}
196196
if features != nil {

0 commit comments

Comments
 (0)