diff --git a/llms/openai/internal/openaiclient/chat.go b/llms/openai/internal/openaiclient/chat.go index 4aec4ffd3..41fcbdcf4 100644 --- a/llms/openai/internal/openaiclient/chat.go +++ b/llms/openai/internal/openaiclient/chat.go @@ -327,7 +327,7 @@ func (c *Client) createChat(ctx context.Context, payload *ChatRequest) (*ChatCom if c.baseURL == "" { c.baseURL = defaultBaseURL } - req, err := http.NewRequestWithContext(ctx, http.MethodPost, c.buildURL("/chat/completions", c.Model), body) + req, err := http.NewRequestWithContext(ctx, http.MethodPost, c.buildURL("/chat/completions", payload.Model), body) if err != nil { return nil, err }