Skip to content

Commit 8fd7fe6

Browse files
committed
Merge remote-tracking branch 'upstream/main' into cursor/spike-spdd-dice-projection-17f4
2 parents 1107238 + 67f5e9d commit 8fd7fe6

8 files changed

Lines changed: 66 additions & 33 deletions

File tree

.github/workflows/export-seed.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ jobs:
2929
- name: Checkout guide
3030
uses: actions/checkout@v4
3131

32-
- name: Set up JDK 21
32+
- name: Set up JDK 25
3333
uses: actions/setup-java@v4
3434
with:
35-
java-version: '21'
35+
java-version: '25'
3636
distribution: 'temurin'
3737
cache: maven
3838

.github/workflows/maven.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,20 @@ jobs:
2020
build:
2121
runs-on: ubuntu-latest
2222

23+
# The pom targets Java 21 bytecode but the toolchain builds on 21 through 25.
24+
# Testing on both proves that stays true; 25 is the JDK the container image runs.
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
java: ['21', '25']
29+
2330
steps:
2431
- uses: actions/checkout@v4
2532

26-
- name: Set up JDK 21
33+
- name: Set up JDK ${{ matrix.java }}
2734
uses: actions/setup-java@v4
2835
with:
29-
java-version: '21'
36+
java-version: ${{ matrix.java }}
3037
distribution: 'temurin'
3138
cache: maven
3239

@@ -58,10 +65,11 @@ jobs:
5865
run: mvn -U -B jacoco:report
5966
continue-on-error: true
6067

61-
# Publish test results as check run annotations
68+
# Publish test results as check run annotations.
69+
# Only from the 25 leg - two legs would race to create the same check run.
6270
- name: Publish Test Results
6371
uses: dorny/test-reporter@v1
64-
if: always() && github.ref == 'refs/heads/main'
72+
if: always() && github.ref == 'refs/heads/main' && matrix.java == '25'
6573
with:
6674
name: Test Results
6775
path: target/surefire-reports/*.xml
@@ -73,16 +81,17 @@ jobs:
7381
uses: actions/upload-artifact@v4
7482
if: always()
7583
with:
76-
name: test-reports
84+
name: test-reports-java${{ matrix.java }}
7785
path: |
7886
target/surefire-reports/
7987
target/site/jacoco/
8088
retention-days: 14
8189

82-
# Upload coverage to Codecov (optional - requires CODECOV_TOKEN secret)
90+
# Upload coverage to Codecov (optional - requires CODECOV_TOKEN secret).
91+
# One leg only - both produce identical coverage.
8392
- name: Upload Coverage to Codecov
8493
uses: codecov/codecov-action@v4
85-
if: always()
94+
if: always() && matrix.java == '25'
8695
continue-on-error: true
8796
with:
8897
files: target/site/jacoco/jacoco.xml

Dockerfile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Uses jammy (not alpine) because ONNX Runtime needs libstdc++
33
# Expects guide-app.jar to be pre-built and placed in this directory
44

5-
FROM eclipse-temurin:21-jre-jammy
5+
FROM eclipse-temurin:25-jre-jammy
66

77
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
88

@@ -19,9 +19,20 @@ COPY guide-app.jar app.jar
1919

2020
EXPOSE 1337
2121

22+
# Both flags below require the JDK 25 base image pinned above:
23+
# --enable-native-access exists from JDK 22, --sun-misc-unsafe-memory-access from JDK 23.
24+
# The jar itself is Java 21 bytecode and runs on any JRE 21+, but if you drop this image
25+
# back to a 21 JRE you must remove these two lines or the JVM will refuse to start.
26+
#
27+
# --enable-native-access: ONNX Runtime and DJL tokenizers call System::load; without this
28+
# JDK 25 warns, and a future JDK will refuse the call outright.
29+
# --sun-misc-unsafe-memory-access=allow: Netty still uses sun.misc.Unsafe memory access,
30+
# which JDK 25 warns about on first use. Drop this once Netty no longer needs it.
2231
ENTRYPOINT ["java", \
2332
"-XX:+UseContainerSupport", \
2433
"-XX:MaxRAMPercentage=75.0", \
2534
"-XX:+UseG1GC", \
2635
"-XX:+ParallelRefProcEnabled", \
36+
"--enable-native-access=ALL-UNNAMED", \
37+
"--sun-misc-unsafe-memory-access=allow", \
2738
"-jar", "app.jar"]

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,8 @@ The Dockerfile uses a multi-stage build that compiles the application from sourc
439439
- ⚠️ First build takes ~2-3 minutes (Maven compilation inside Docker)
440440

441441
The build process:
442-
1. Stage 1: Uses `maven:3.9.9-eclipse-temurin-21` to compile the application
443-
2. Stage 2: Uses lightweight `eclipse-temurin:21-jre-jammy` runtime image with the compiled JAR
442+
1. Stage 1: Uses `maven:3.9-eclipse-temurin-25` to compile the application
443+
2. Stage 2: Uses lightweight `eclipse-temurin:25-jre-jammy` runtime image with the compiled JAR
444444

445445
This approach ensures consistency across environments and simplifies onboarding for new contributors.
446446

@@ -553,6 +553,11 @@ export OPENAI_API_KEY=sk-your-key-here
553553

554554
2. **Neo4j**: See the [Local vs CI Testing](#local-vs-ci-testing) section below.
555555

556+
3. **A JDK between 21 and 25**. The build targets Java 21 bytecode, so the resulting jar
557+
runs on any JRE 21+, but it builds on anything up to 25 — CI runs the suite on both 21
558+
and 25. If you raise `<java.version>` in the pom, note that Kotlin must be 2.3.0+ to
559+
target 25 at all, and the `codegen-gradle` Kotlin version has to move with it.
560+
556561
### Local vs CI Testing
557562

558563
The test suite uses Neo4j, which can be provided in two ways:

codegen-gradle/build.gradle.kts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// Gradle build for Drivine KSP code generation
22
//
33
// Why: Maven's third-party KSP plugin (kotlin-maven-symbol-processing) hasn't been
4-
// updated for Kotlin 2.2.0 yet. This Gradle build is a workaround to generate Drivine DSL code.
4+
// updated for current Kotlin releases yet. This Gradle build is a workaround to generate Drivine DSL code.
5+
// Keep the Kotlin version here in sync with ${kotlin.version} in the parent pom.
56
//
67
// How it works:
78
// 1. This Gradle build runs KSP on the domain classes
@@ -11,8 +12,8 @@
1112
// To run code generation: ./gradlew kspKotlin
1213

1314
plugins {
14-
kotlin("jvm") version "2.2.0"
15-
id("com.google.devtools.ksp") version "2.2.20-2.0.4"
15+
kotlin("jvm") version "2.3.21"
16+
id("com.google.devtools.ksp") version "2.3.10"
1617
}
1718

1819
group = "com.embabel.guide"

codegen-gradle/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

pom.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@
1717
<description>Embabel chatbot</description>
1818

1919
<properties>
20+
<!-- Bytecode target, NOT the build JDK. The toolchain (Kotlin 2.3.x, Gradle 9.x,
21+
JaCoCo 0.8.15) builds on JDK 21 through 25; keeping the target at 21 means the
22+
artifact runs on any JRE 21+. Raise this only when dropping Java 21 support. -->
2023
<java.version>21</java.version>
2124
<embabel-agent.version>1.0.0-RC1-SNAPSHOT</embabel-agent.version>
2225
<spring-ai.version>1.1.1</spring-ai.version>
23-
<kotlin.version>2.2.0</kotlin.version>
26+
<kotlin.version>2.3.21</kotlin.version>
2427
</properties>
2528

2629
<dependencies>
@@ -51,7 +54,7 @@
5154
<dependency>
5255
<groupId>org.drivine</groupId>
5356
<artifactId>drivine4j-spring-boot-starter</artifactId>
54-
<version>0.0.46</version>
57+
<version>0.0.59</version>
5558
</dependency>
5659

5760
<!-- Chat session storage with autoconfiguration -->
@@ -366,7 +369,7 @@
366369
<plugin>
367370
<groupId>org.jacoco</groupId>
368371
<artifactId>jacoco-maven-plugin</artifactId>
369-
<version>0.8.12</version>
372+
<version>0.8.15</version>
370373
<executions>
371374
<execution>
372375
<id>prepare-agent</id>
Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
package com.embabel.hub.integrations
22

3+
import com.embabel.agent.api.models.AnthropicModels
4+
import com.embabel.agent.api.models.DeepSeekModels
5+
import com.embabel.agent.api.models.OpenAiModels
6+
37
/**
48
* Supported LLM providers for BYOK (Bring Your Own Key).
59
* Each provider defines default models for each role in the Guide app.
@@ -12,18 +16,18 @@ enum class LlmProvider(
1216
val validationModel: String = chatModel,
1317
) {
1418
OPENAI(
15-
chatModel = "gpt-4.1",
16-
classifierModel = "gpt-4.1-mini",
17-
narratorModel = "gpt-4.1-mini",
18-
summarizerModel = "gpt-4.1-nano",
19-
validationModel = "gpt-4.1-nano",
19+
chatModel = OpenAiModels.GPT_41,
20+
classifierModel = OpenAiModels.GPT_41_MINI,
21+
narratorModel = OpenAiModels.GPT_41_MINI,
22+
summarizerModel = OpenAiModels.GPT_41_NANO,
23+
validationModel = OpenAiModels.GPT_41_NANO,
2024
),
2125
ANTHROPIC(
22-
chatModel = "claude-sonnet-4-6",
23-
classifierModel = "claude-haiku-4-5",
24-
narratorModel = "claude-haiku-4-5",
25-
summarizerModel = "claude-haiku-4-5",
26-
validationModel = "claude-haiku-4-5",
26+
chatModel = AnthropicModels.CLAUDE_SONNET_4_6,
27+
classifierModel = AnthropicModels.CLAUDE_HAIKU_4_5,
28+
narratorModel = AnthropicModels.CLAUDE_HAIKU_4_5,
29+
summarizerModel = AnthropicModels.CLAUDE_HAIKU_4_5,
30+
validationModel = AnthropicModels.CLAUDE_HAIKU_4_5,
2731
),
2832
MISTRAL(
2933
chatModel = "mistral-large-latest",
@@ -33,10 +37,10 @@ enum class LlmProvider(
3337
validationModel = "mistral-small-latest",
3438
),
3539
DEEPSEEK(
36-
chatModel = "deepseek-chat",
37-
classifierModel = "deepseek-chat",
38-
narratorModel = "deepseek-chat",
39-
summarizerModel = "deepseek-chat",
40+
chatModel = DeepSeekModels.DEEPSEEK_V4_PRO,
41+
classifierModel = DeepSeekModels.DEEPSEEK_V4_FLASH,
42+
narratorModel = DeepSeekModels.DEEPSEEK_V4_FLASH,
43+
summarizerModel = DeepSeekModels.DEEPSEEK_V4_FLASH,
4044
),
4145

4246
}

0 commit comments

Comments
 (0)