
sidd-ai
Any AI model, one line of Java.
AiClient.chatQuick( "gpt-6.1-sol", prompt); AiClient.chatQuick( "claude-sonnet-5.5", prompt); AiClient.chatQuick( "llama3.2", prompt);
The same method for any model
- Before
- A different SDK for every model provider.
- What I built
- One Java call for any of them.
An open-source, Apache 2.0 library on Maven Central with 600+ downloads. Think LiteLLM, but for Java: pass "gpt-6.1-sol", "claude-sonnet-5.5" or "llama3.2" to the same method and it figures out the provider. Works from a plain main(), no Spring and no YAML.

ModelRouter looks at the start of the model id and picks the provider from that. If it doesn't recognise the prefix, it assumes you mean a local Ollama model.
String reply = AiClient.chatQuick("gemini-3.8-flash", "Explain JVM GC in one line"); // ModelRouter resolved "gemini-3.8-flash" to Gemini. No config, no Spring context.
<dependency> <groupId>io.github.prabhusiddarth</groupId> <artifactId>sidd-ai</artifactId> <version>1.0.5</version> </dependency>
// builder for full control AiClient client = AiClient.builder() .apiKey(System.getenv("OPENAI_API_KEY")) .model("gpt-6.1-sol") .build(); // or force a provider AiClient.chatWithProvider("nim", "z-ai/glm-5.3", prompt);
try { AiClient.chatQuick(model, prompt); } catch (AiAuthException e) { // bad or missing key } catch (AiRateLimitException e) { // back off and retry } catch (AiApiException e) { // provider error }
sidd-ai is open source under the Apache 2.0 licence, so you can drop it into a commercial project without asking. It has passed 600 downloads on Maven Central. The code, issues and releases all live on GitHub. If a provider you need is missing, a new route is usually a prefix check and one client class; I review pull requests.
| Capability | Spring AI | LangChain4j | sidd-ai |
|---|---|---|---|
| Zero framework | No | Partial | Yes |
| Works in plain main() | No | Yes | Yes |
| One-line calls | No | No | Yes |
| Unified exceptions | Partial | Partial | Yes |
| Swap model via a string | No | No | Yes |
Write together. Let a council of models draft the spec.