purushah opened a new issue, #1103: URL: https://github.com/apache/flink-agents/issues/1103
### Search before asking - [x] I searched in the [issues](https://github.com/apache/flink-agents/issues) and found nothing similar. ### Description **Motivation** Python has `OpenAIEmbeddingModelConnection` and `OpenAIEmbeddingModelSetup`; Java has only Ollama and Bedrock. A Java agent that needs an OpenAI embedding today must go through the Python wrapper, which requires a Python environment on the task managers for a plain HTTPS call. This is a Java/Python parity gap. The Java OpenAI chat model already depends on `com.openai:openai-java`, so no new third-party dependency is needed. **Proposed changes** - New module `integrations/embedding-models/openai` with `OpenAIEmbeddingModelConnection` and `OpenAIEmbeddingModelSetup`, built the same way `OpenAICompletionsConnection` builds its client. - Arguments mirror the Python classes one for one: connection `api_key`, `base_url`, `request_timeout`, `max_retries`, `organization`, `project`; setup `connection`, `model`, `encoding_format`, `dimensions`, `user`, `additional_kwargs`. - `embedWithUsage` reports prompt and total tokens so the embedding token metrics from #870 cover this provider. - `ResourceName` constants, YAML aliases, `dist` registration, and a Java tab in the OpenAI section of `embedding_models.md`. - Unit tests with a mocked client, following `BedrockEmbeddingModelTest`. One naming question: the Java OpenAI chat connection uses `api_base_url` and `timeout`, while the Python embedding connection uses `base_url` and `request_timeout`. I propose the Python embedding names so the two embedding implementations align across languages. Happy to follow the chat-model names instead if preferred. ### Are you willing to submit a PR? - [x] I'm willing to submit a PR! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
