openai-java
AGENTS.md1.5k starsChanged 3 months agoApache-2.0View on GitHub
Read CONTRIBUTING.md and SECURITY.md before making changes. Most SDK sources are generated; .castiron.stats.yml records generation metadata. Check whether the generator owns the code you are changing, preserve existing generated behavior, and update the authoritative source when it is available. The openai-java-example/ directory is not modified by the generator. Follow the custom-code guidance. Budget changes belong in a separate PR containing only .castiron-ratchet.json, with an explicit justification in the PR description. Increases require a human approving review before merging. Agents may…
- Reads credentials
Trending
Less talk lately.about the whole repository
Who's talking about openai/openai-java
- @brunoborges.bsky.social“The official #OpenAI SDK for #Java is finally out. github.com/openai/opena...”Bluesky · Dec 17, 2024 · 61 likes
- spring-projects/spring-ai“Customize request parameters”GitHub · Apr 23, 2025 · 7 reactions
- langchain4j/langchain4j“[FEATURE] Support the official OpenAI Java SDK”GitHub · Jan 6, 2025 · 3 reactions
- DataDog/dd-trace-java“Fix OpenAI Java 4.54 compatibility”GitHub · Aug 29, 2026 · 2 reactions
- tempoden/llm-judge“Bump com.openai:openai-java from 1.6.1 to 2.2.0”GitHub · May 23, 2025 · 2 reactions
The biggest 5 of 45 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 45
Talked about on GitHub, Bluesky and Hacker News (45 times).
On GitHub · 40
- Apr 23, 2025Customize request parameters — spring-projects/spring-ai7 reactions
- Jan 6, 2025[FEATURE] Support the official OpenAI Java SDK — langchain4j/langchain4j3 reactions
- Aug 29, 2026Fix OpenAI Java 4.54 compatibility — DataDog/dd-trace-java2 reactions · 8 comments
- May 23, 2025Bump com.openai:openai-java from 1.6.1 to 2.2.0 — tempoden/llm-judge2 reactions · 1 comment
- May 22, 2025Bump com.openai:openai-java from 1.6.1 to 2.1.0 — tempoden/llm-judge2 reactions · 2 comments
35 more on GitHub
- Oct 5, 2026build(deps): bump the non-major-updates group with 3 updates — UnscientificJsZhai/TelegramWebHookProxy1 reaction · 1 comment
- Sep 28, 2026build(deps): bump the non-major-updates group with 5 updates — UnscientificJsZhai/TelegramWebHookProxy1 reaction · 1 comment
- Sep 2, 2026fix(ci): restore Castiron statuses for fork PRs — openai/openai-ruby1 reaction · 3 comments
- Aug 24, 2026chore(deps): bump com.openai:openai-java from 4.50.0 to 4.52.0 — slovymovy/slovy-movy-app1 reaction
- Aug 5, 2026deps: bump com.openai:openai-java from 4.15.0 to 4.50.0 — ddd-mall/j-store1 reaction · 3 comments
- Jul 27, 2026Enrich OpenAI transcription options and responses — spring-projects/spring-ai1 reaction · 5 comments
- Jun 22, 2026chore(deps): bump com.openai:openai-java from 4.39.1 to 4.41.0 — slovymovy/slovy-movy-app1 reaction
- Jun 2, 2026chore(deps): bump com.openai:openai-java from 4.37.0 to 4.38.0 — slovymovy/slovy-movy-app1 reaction
- May 18, 2026chore(deps): bump com.openai:openai-java from 4.35.0 to 4.36.0 — slovymovy/slovy-movy-app1 reaction
- Mar 27, 2026Use sorted keys for JSON encoding to enable OpenAI prefix caching — teunlao/swift-ai-sdk1 reaction · 4 comments
- Jan 23, 2026Bump com.openai:openai-java from 4.10.0 to 4.16.1 — Mattque04/git-assist1 reaction · 1 comment
- Jan 22, 2026Bump com.openai:openai-java from 4.10.0 to 4.16.0 — Mattque04/git-assist1 reaction · 2 comments
- Jan 12, 2026Bump com.openai:openai-java from 4.10.0 to 4.15.0 — Mattque04/git-assist1 reaction · 2 comments
- Jan 7, 2026Bump com.openai:openai-java from 4.10.0 to 4.14.0 — Mattque04/git-assist1 reaction · 2 comments
- Dec 19, 2025Bump com.openai:openai-java from 4.10.0 to 4.13.0 — Mattque04/git-assist1 reaction · 2 comments
- Dec 16, 2025Bump com.openai:openai-java from 4.10.0 to 4.12.0 — Mattque04/git-assist1 reaction · 2 comments
- Dec 14, 2025Bump com.openai:openai-java from 4.10.0 to 4.11.0 — Mattque04/git-assist1 reaction · 2 comments
- Oct 21, 2025Bump com.openai:openai-java from 3.5.3 to 4.6.1 — flydzen/ide-voice-assistant1 reaction · 1 comment
- Oct 21, 2025Bump com.openai:openai-java from 3.0.2 to 4.6.1 — kavos113/zatsu-agent1 reaction · 1 comment
- Oct 20, 2025Bump com.openai:openai-java from 2.2.0 to 4.6.1 — tempoden/llm-judge1 reaction · 1 comment
- Oct 20, 2025Bump com.openai:openai-java from 3.0.2 to 4.5.0 — kavos113/zatsu-agent1 reaction · 2 comments
- Oct 20, 2025Bump com.openai:openai-java from 3.5.3 to 4.5.0 — flydzen/ide-voice-assistant1 reaction · 2 comments
- Oct 17, 2025Bump com.openai:openai-java from 2.2.0 to 4.5.0 — tempoden/llm-judge1 reaction · 2 comments
- Oct 17, 2025Bump com.openai:openai-java from 3.5.3 to 4.4.0 — flydzen/ide-voice-assistant1 reaction · 2 comments
- Oct 17, 2025Bump com.openai:openai-java from 3.0.2 to 4.4.0 — kavos113/zatsu-agent1 reaction · 2 comments
- Oct 16, 2025Bump com.openai:openai-java from 2.2.0 to 4.4.0 — tempoden/llm-judge1 reaction · 2 comments
- Oct 13, 2025Bump com.openai:openai-java from 3.0.2 to 4.3.0 — kavos113/zatsu-agent1 reaction · 2 comments
- Oct 10, 2025Bump com.openai:openai-java from 2.2.0 to 4.3.0 — tempoden/llm-judge1 reaction · 2 comments
- Oct 10, 2025Bump com.openai:openai-java from 3.5.3 to 4.3.0 — flydzen/ide-voice-assistant1 reaction · 2 comments
- Oct 7, 2025Bump com.openai:openai-java from 3.5.3 to 4.2.0 — flydzen/ide-voice-assistant1 reaction · 2 comments
- Oct 7, 2025Bump com.openai:openai-java from 3.0.2 to 4.2.0 — kavos113/zatsu-agent1 reaction · 2 comments
- Oct 6, 2025Bump com.openai:openai-java from 2.2.0 to 4.2.0 — tempoden/llm-judge1 reaction · 2 comments
- Oct 3, 2025Bump com.openai:openai-java from 3.0.2 to 4.1.0 — kavos113/zatsu-agent1 reaction · 2 comments
- Jul 29, 2025Bump openai-client from 2.2.0 to 2.19.2 — gasparian/llm-judge1 reaction · 1 comment
- May 29, 2025Bump com.openai:openai-java from 2.2.0 to 2.3.0 — skrcode/java-refactoring-toolkit1 reaction · 1 comment
On Bluesky · 4
- Dec 17, 2024The official #OpenAI SDK for #Java is finally out. github.com/openai/opena... — @brunoborges.bsky.social61 likes and reposts · 2 replies
- Dec 18, 2024An early Christmas present from OpenAI. github.com/openai/opena... — @speakjava.bsky.social2 likes and reposts
- Dec 18, 2024OpenAI Java API Library Official Java library for OpenAI, enabling easier integration of OpenAI's AI capabilities into Java-based… — @newspipe.bsky.social2 likes and reposts
- Feb 16, 2025There's no need to do any of that. Just compare docs.langchain4j.dev/get-started/ github.com/openai/opena... — @mariozechner.at0 likes and reposts · 1 reply
On Hacker News · 1
- Dec 18, 2024OpenAI Java API Library2 points
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 1 is common, 2 are distinctive, and 3 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 3
Read CONTRIBUTING.md and SECURITY.md before making changes.
- Very specific: line 12
Follow the custom-code guidance.
- Very specific: line 22
Never commit OpenAI API keys, bearer tokens, AWS/Bedrock credentials, Sonatype tokens, GPG private keys or passphrases, or any other …
- Common: line 29
Keep credentials, authorization or cookie headers, signed requests, and real customer data out of default or uncontrolled logs, errors, …
- Very specific: line 51
Treat large payloads as a normal API contract, not evidence of malformed or hostile input.
- Distinctive: line 55
Prefer incremental processing, amortized-linear buffering, timely cleanup, and caller cancellation.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent instructions
Read CONTRIBUTING.md and SECURITY.md before making changes.
Most SDK sources are generated; .castiron.stats.yml records generation metadata. Check whether the
generator owns the code you are changing, preserve existing generated behavior, and update the
authoritative source when it is available. The openai-java-example/ directory is not modified by
the generator.
Custom-code budget
Follow the custom-code guidance. Budget changes
belong in a separate PR containing only .castiron-ratchet.json, with an explicit justification
in the PR description. Increases require a human approving review before merging.
Agents may investigate and draft proposals, but must not approve budget increases
(including through a human's credentials) or bypass the gate. Do not weaken
counting, broaden exclusions, or alter generation metadata to make a change pass.
The checker and effective budget come from main, not the PR. Keep default CODEOWNERS.
Security requirements
- Never commit OpenAI API keys, bearer tokens, AWS/Bedrock credentials, Sonatype tokens, GPG private
keys or passphrases, or any other secrets. Read credentials from environment variables such as
OPENAI_API_KEY; use obviously fake values in examples, JUnit/WireMock fixtures, recordings, and snapshots. Keep ordinary unit and pull-request tests offline and free of real credentials. Purpose-built, explicitly opt-in live integration tests such asBedrockRuntimeLiveTestmay use dedicated, least-privilege credentials and synthetic inputs; never log credentials or customer data. - Keep credentials, authorization or cookie headers, signed requests, and real customer data out of
default or uncontrolled logs, errors, traces, and test output. Preserve documented diagnostics,
including
OpenAIServiceException.body(), API-error and validation messages, and explicitly enabledDEBUGrequest/response body logging. Warn before enabling sensitive diagnostics, use sanitized fixtures, and redact before forwarding data to untrusted sinks. - Review direct and transitive Maven dependencies, Gradle plugins and repositories, the Gradle wrapper and distribution integrity, dependency locks, and build/install/download scripts before changing them. Avoid untrusted artifacts, repositories, and executable installation hooks.
- Pin third-party GitHub Actions to full immutable commit SHAs and review updates. Keep workflow and publishing permissions minimal, disable persisted checkout credentials, never expose secrets to untrusted pull requests, and keep GitHub App tokens, Sonatype credentials, and GPG signing material within their protected release or publishing environments.
- Require security-focused review for changes to API-key or Bedrock/AWS authentication; OkHttp transport, base URLs, redirects, proxies, TLS, or header forwarding; file uploads and path handling; Jackson serialization/deserialization or polymorphic types; and signing, release, or publication logic. Add focused, boundary-appropriate regression coverage: JUnit/WireMock tests for SDK behavior and workflow, Gradle, or shell checks for signing, release, and publication logic.
- Report suspected vulnerabilities privately through SECURITY.md. Do not open public issues, discussions, or pull requests containing vulnerability details or secrets.
Large-payload compatibility
Treat large payloads as a normal API contract, not evidence of malformed or
hostile input. Responses, Chat Completions, and other APIs can legitimately
return large application/json bodies and streaming events. Do not introduce
new arbitrary fixed limits on bodies, events, or lines as a security or efficiency fix.
Prefer incremental processing, amortized-linear buffering, timely cleanup, and
caller cancellation. Any new rejection limit needs an explicit, owner-approved
API contract and a review of existing supported payloads and transports.
Preserve longstanding dependency limits unless changing them is explicitly in scope;
regression fixtures should exercise payloads supported by recent SDK releases.
Protect this behavior with focused, deterministic public-entrypoint tests using large synthetic payloads generated in memory, not committed captures or live image generation. Their high memory use is intentional: do not shrink the payloads or raise client limits to make the tests pass. Keep coverage to the main JSON and streaming categories, and run large cases sequentially to keep peak memory reasonable. The fixture size is a regression probe, not a new API maximum.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

