Two mode implementations (openai and minimax) are using the same class that has one utility method.

public class ApiUtils {

    public static final String DEFAULT_BASE_URL = "https://api.openai.com";

    public static Consumer<HttpHeaders> getJsonContentHeaders(String apiKey) {
        return (headers) -> {
            headers.setBearerAuth(apiKey);
            headers.setContentType(MediaType.APPLICATION_JSON);
        };
    };

}

Review usage and consider moving into spring-ai-core

Comment From: piotrooo

@tzolov and @markpollack, it looks like this is done. Should we close this issue?

Comment From: markpollack

Yep!! Thakns for taking the time to point it out. Not been keeping up with closing issues as I should have been.