Skip to content

Add async APIs, cancellation support, and typed metrics accessors#188

Merged
bernardladenthin merged 15 commits into
mainfrom
claude/upbeat-hypatia-wPdK5
May 23, 2026
Merged

Add async APIs, cancellation support, and typed metrics accessors#188
bernardladenthin merged 15 commits into
mainfrom
claude/upbeat-hypatia-wPdK5

Add completeBatch / chatBatch parallel dispatch (§2.4)

de457b2
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis succeeded May 23, 2026 in 21s

Annotations

Check warning on line 45 in src/main/java/net/ladenthin/llama/Timings.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Constructor has 9 parameters, which is greater than 7 authorized.

See more on https://sonarcloud.io/project/issues?id=bernardladenthin_java-llama.cpp&issues=AZ5RwdULiT-NlG6Wu_GK&open=AZ5RwdULiT-NlG6Wu_GK&pullRequest=188

Check warning on line 318 in src/test/java/net/ladenthin/llama/LlamaModelTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this use of "Thread.sleep()".

See more on https://sonarcloud.io/project/issues?id=bernardladenthin_java-llama.cpp&issues=AZ5R1QkEfy7njHklOSko&open=AZ5R1QkEfy7njHklOSko&pullRequest=188

Check warning on line 261 in src/test/java/net/ladenthin/llama/LlamaModelTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this use of "Thread.sleep()".

See more on https://sonarcloud.io/project/issues?id=bernardladenthin_java-llama.cpp&issues=AZ5RwdUBiT-NlG6Wu_GG&open=AZ5RwdUBiT-NlG6Wu_GG&pullRequest=188

Check warning on line 262 in src/test/java/net/ladenthin/llama/LlamaModelTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this block of code, fill it in, or add a comment explaining why it is empty.

See more on https://sonarcloud.io/project/issues?id=bernardladenthin_java-llama.cpp&issues=AZ5RwdUBiT-NlG6Wu_GH&open=AZ5RwdUBiT-NlG6Wu_GH&pullRequest=188

Check failure on line 119 in src/main/java/net/ladenthin/llama/json/ChatResponseParser.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "usage" 3 times.

See more on https://sonarcloud.io/project/issues?id=bernardladenthin_java-llama.cpp&issues=AZ5TuT9ooI4Cm-ZmqsOR&open=AZ5TuT9ooI4Cm-ZmqsOR&pullRequest=188

Check failure on line 611 in src/main/cpp/jllama.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this use of "void *" with a more meaningful type.

See more on https://sonarcloud.io/project/issues?id=bernardladenthin_java-llama.cpp&issues=AZ5TsjMti-BUK6nuC9zn&open=AZ5TsjMti-BUK6nuC9zn&pullRequest=188

Check warning on line 50 in src/test/java/net/ladenthin/llama/CancellationTokenTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Update this method so that its implementation is not identical to "cancelFlipsState" on line 25.

See more on https://sonarcloud.io/project/issues?id=bernardladenthin_java-llama.cpp&issues=AZ5RwdRliT-NlG6Wu_GF&open=AZ5RwdRliT-NlG6Wu_GF&pullRequest=188

Check warning on line 252 in src/main/java/net/ladenthin/llama/LlamaModel.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Reduce the total number of break and continue statements in this loop to use at most one.

See more on https://sonarcloud.io/project/issues?id=bernardladenthin_java-llama.cpp&issues=AZ5RwdUliT-NlG6Wu_GL&open=AZ5RwdUliT-NlG6Wu_GL&pullRequest=188

Check warning on line 311 in src/test/java/net/ladenthin/llama/LlamaModelTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this use of "Thread.sleep()".

See more on https://sonarcloud.io/project/issues?id=bernardladenthin_java-llama.cpp&issues=AZ5RwdUBiT-NlG6Wu_GI&open=AZ5RwdUBiT-NlG6Wu_GI&pullRequest=188

Check failure on line 77 in src/main/java/net/ladenthin/llama/json/ChatResponseParser.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "choices" 4 times.

See more on https://sonarcloud.io/project/issues?id=bernardladenthin_java-llama.cpp&issues=AZ5TuT9ooI4Cm-ZmqsOS&open=AZ5TuT9ooI4Cm-ZmqsOS&pullRequest=188

Check failure on line 165 in src/main/java/net/ladenthin/llama/ChatRequest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "function" 4 times.

See more on https://sonarcloud.io/project/issues?id=bernardladenthin_java-llama.cpp&issues=AZ5TuT98oI4Cm-ZmqsOT&open=AZ5TuT98oI4Cm-ZmqsOT&pullRequest=188

Check warning on line 133 in src/main/java/net/ladenthin/llama/LlamaModel.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove or merge the dangling Javadoc comment(s).

See more on https://sonarcloud.io/project/issues?id=bernardladenthin_java-llama.cpp&issues=AZ5TxuLEEoWbFvdrIbKp&open=AZ5TxuLEEoWbFvdrIbKp&pullRequest=188

Check warning on line 27 in src/main/java/net/ladenthin/llama/ToolHandler.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace generic exceptions with specific library exceptions or a custom exception.

See more on https://sonarcloud.io/project/issues?id=bernardladenthin_java-llama.cpp&issues=AZ5TuT7IoI4Cm-ZmqsOQ&open=AZ5TuT7IoI4Cm-ZmqsOQ&pullRequest=188