OpenAI SDK for Java 4.54.0
Last reviewed Oct 28, 2026
Prompt Details
Prompt Composition
2prompts
- Java 25113 lines · 2.8K tokens
- OpenAI SDK for Java 4.54.080 lines · 3.8K tokens
Total193 lines · 6.7K tokens
CWE Coverage
- 20
- 22
- 59
- 78
- 79
- 88
- 89
- 95
- 117
- 190
- 201
- 208
- 209
- 214
- 294
- 295
- 297
- 323
- 327
- 338
- 347
- 362
- 367
- 378
- 427
- 470
- 471
- 488
- 494
- 502
- 532
- 611
- 639
- 653
- 681
- 732
- 770
- 772
- 776
- 789
- 807
- 838
- 841
- 862
- 863
- 915
- 916
- 918
- 922
- 942
- 1333
- 1426
- 1427
Prompt Preview
Apply the Java 25 baseline first. These rules cover com.openai:openai-java:4.54.0 and its matching core, OkHttp, and optional Bedrock artifacts in server applications. The framework-neutral artifacts require Java 8 or later; these rules target Java 25. SDK types and API credentials do not enforce your application's user or tenant permissions.
Dependencies and client configuration
- Keep the SDK artifacts on compatible versions and retain
checkJacksonVersionCompatibility(true); resolve Jackson conflicts through the application's supported dependency graph instead of disabling the check. The SDK's minimum compatible Jackson version is not a security patch recommendation. - Use
openai-javadirectly when wiring a SpringOpenAIClientbean. Do not select the retiredopenai-java-spring-boot-starterfor this version; its final release is 4.45.0 and it receives no fixes or compatibility support. - Treat
OpenAIOkHttpClient.fromEnv()and its asynchronous counterpart as deployment configuration loaders. Auditopenai.*system properties, which take precedence over corresponding environment variables, plusOPENAI_CUSTOM_HEADERS,OPENAI_LOG, andAZURE_OPENAI_KEY; apply explicit trusted settings after loading environment configuration. - Keep
withOptions(),putAdditionalHeader(),putAdditionalQueryParam(),putAdditionalBodyProperty(), and arbitraryJsonValue/JsonFieldsetters in trusted code. Do not bind an inbound request directly to SDK builders or allow these escape hatches to bypass approved models, roles, tools, storage settings, project