Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ verbatim as the body of the matching GitHub release.

| Version | Date | Notes |
|---|---|---|
| v0.2.9 | 2026-11-24 | [changelog/v0.2.9.md](changelog/v0.2.9.md) |
| v0.2.8 | 2026-11-24 | [changelog/v0.2.8.md](changelog/v0.2.8.md) |
| v0.2.7 | 2026-11-23 | [changelog/v0.2.7.md](changelog/v0.2.7.md) |
| v0.2.6 | 2026-11-23 | [changelog/v0.2.6.md](changelog/v0.2.6.md) |
Expand Down
14 changes: 14 additions & 0 deletions changelog/v0.2.9.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# v0.2.9

Response-cache hits are visible on the dashboard.

## Added

- `/admin/stats` now reports `cache.exact_hits` alongside `semantic_hits`, so Path's own
exact-match response cache can be distinguished from provider prompt caching.
- The dashboard Cache card shows exact hits, semantic hits and cached prompt tokens.

## Changed

- The Cache card labels its percentage as `prompt cache`, making clear that the hit
ratio is provider prompt-cache usage rather than the response-cache hit count.
2 changes: 1 addition & 1 deletion deploy/dokploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ database. The console is always a plain Application.
3. Compose path: `deploy/dokploy/compose.yml`.
4. **Trigger Type: On Tag**, with auto-deploy enabled. The gateway is a production
service; a pull request or a push to `Develop` must not restart it. A release tag
(`v0.2.8`) is the only thing that deploys — see "When it deploys" below.
(`v0.2.9`) is the only thing that deploys — see "When it deploys" below.
5. **Environment** (the compose file references all of these):

```bash
Expand Down
2 changes: 1 addition & 1 deletion docs/SPRING-AI.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on Spring AI; the gateway never depends on it.
<dependency>
<groupId>io.github.an1ndra</groupId>
<artifactId>path-spring-ai</artifactId>
<version>0.2.8</version>
<version>0.2.9</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion path-gateway/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>io.github.an1ndra</groupId>
<artifactId>path-parent</artifactId>
<version>0.2.8</version>
<version>0.2.9</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ private Map<String, Object> projectStats(Long projectId, Duration window) {
cache.put("savings_usd", savings);
cache.put("semantic_hits", rows.stream()
.filter(r -> "semantic".equals(r.getCacheTier())).count());
cache.put("exact_hits", rows.stream()
.filter(r -> "exact".equals(r.getCacheTier())).count());
out.put("cache", cache);
out.put("fallback_requests", rows.stream().filter(r -> r.getAttempts() > 1).count());
out.put("estimated_usage_requests", rows.stream().filter(UsageRecord::isUsageEstimated).count());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ public Map<String, Object> adminStats(Duration window) {
cache.put("hit_ratio", ratio(cachedTokens, promptTokens));
cache.put("savings_usd", savings);
cache.put("semantic_hits", usage.countByCreatedAtAfterAndCacheTier(from, "semantic"));
cache.put("exact_hits", usage.countByCreatedAtAfterAndCacheTier(from, "exact"));
out.put("cache", cache);

out.put("fallback_requests", usage.countByAttemptsGreaterThanAndCreatedAtAfter(1, from));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ void semanticHitsComeFromTheWindowRatherThanMemory() {
Map<String, Object> stats = reporting.stats("24h", null, null);

assertThat(cache(stats).get("semantic_hits")).isEqualTo(2L);
assertThat(cache(stats).get("exact_hits")).isEqualTo(1L);
}

@Test
Expand All @@ -96,12 +97,14 @@ void aProjectCountsOnlyItsOwnSemanticHits() {
Map<String, Object> stats = reporting.stats("24h", projectId, null);

assertThat(cache(stats).get("semantic_hits")).isEqualTo(1L);
assertThat(cache(stats).get("exact_hits")).isEqualTo(0L);
}

@Test
void anEmptyWindowReportsZeroRatherThanNothing() {
Map<String, Object> stats = reporting.stats("24h", null, null);

assertThat(cache(stats).get("semantic_hits")).isEqualTo(0L);
assertThat(cache(stats).get("exact_hits")).isEqualTo(0L);
}
}
2 changes: 1 addition & 1 deletion path-spring-ai/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>io.github.an1ndra</groupId>
<artifactId>path-parent</artifactId>
<version>0.2.8</version>
<version>0.2.9</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<groupId>io.github.an1ndra</groupId>
<artifactId>path-parent</artifactId>
<version>0.2.8</version>
<version>0.2.9</version>
<packaging>pom</packaging>
<name>path-parent</name>
<description>Build parent for Path, the provider-agnostic LLM gateway, and its Spring AI adapter</description>
Expand Down
Loading