Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg/model/provider/dmr/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ func (c *Client) CreateChatCompletionStream(ctx context.Context, messages []chat
slog.Error("Failed to marshal DMR request to JSON", "error", err)
}
if c.modelOptions.StructuredOutput != nil {
slog.Debug("Adding structured output to DMR request", "structured_output", c.modelOptions.StructuredOutput)
request.ResponseFormat = &openai.ChatCompletionResponseFormat{
Type: openai.ChatCompletionResponseFormatTypeJSONSchema,
JSONSchema: &openai.ChatCompletionResponseFormatJSONSchema{
Expand Down
7 changes: 6 additions & 1 deletion pkg/teamloader/teamloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,12 @@ func getModelsForAgent(ctx context.Context, cfg *latest.Config, a *latest.AgentC
return nil, fmt.Errorf("model '%s' not found in configuration", name)
}

model, err := provider.New(ctx, &modelCfg, env, options.WithGateway(runtimeConfig.ModelsGateway))
opts := []options.Opt{options.WithGateway(runtimeConfig.ModelsGateway)}
if a.StructuredOutput != nil {
opts = append(opts, options.WithStructuredOutput(a.StructuredOutput))
}

model, err := provider.New(ctx, &modelCfg, env, opts...)
if err != nil {
return nil, err
}
Expand Down
Loading