@@ -465,12 +465,15 @@ public record Translation(
465465 @ Nonnull
466466 public OrchestrationChatResponse responseFormatJsonSchema (
467467 @ Nonnull final String word , @ Nonnull final Class <?> targetType ) {
468+ // Gemini cannot be used here. This is a known issue that should be resolved with AI Core
469+ // release 2510b. See https://jira.tools.sap/browse/AI-125770
470+ final var configWithGpt4 = new OrchestrationModuleConfig ().withLlmConfig (GPT_4O_MINI );
468471 val schema =
469472 ResponseJsonSchema .fromType (targetType )
470473 .withDescription ("Output schema for language translation." )
471474 .withStrict (true );
472475 val configWithResponseSchema =
473- config .withTemplateConfig (TemplateConfig .create ().withJsonSchemaResponse (schema ));
476+ configWithGpt4 .withTemplateConfig (TemplateConfig .create ().withJsonSchemaResponse (schema ));
474477
475478 val prompt =
476479 new OrchestrationPrompt (
@@ -586,8 +589,12 @@ public OrchestrationChatResponse templateFromPromptRegistryByScenario(
586589 @ Nonnull
587590 public OrchestrationChatResponse localPromptTemplate (@ Nonnull final String promptTemplate )
588591 throws IOException {
592+ // Gemini cannot be used here. This is a known issue that should be resolved with AI Core
593+ // release 2510b. See https://jira.tools.sap/browse/AI-125770
594+ final var configWithGpt4 = new OrchestrationModuleConfig ().withLlmConfig (GPT_4O_MINI );
589595 val template = TemplateConfig .create ().fromYaml (promptTemplate );
590- val configWithTemplate = template != null ? config .withTemplateConfig (template ) : config ;
596+ val configWithTemplate =
597+ template != null ? configWithGpt4 .withTemplateConfig (template ) : configWithGpt4 ;
591598
592599 val inputParams = Map .of ("language" , "German" );
593600 val prompt = new OrchestrationPrompt (inputParams );
0 commit comments