Skip to content
Closed
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Releases before 0.10.0 are in the

## Unreleased

- LiteRT-LM unsupported-runtime errors name the pinned runtime tag (`v0.19.1-3`) instead of `v0.19.1-2` ([#1861](https://github.com/leehack/llamadart/issues/1861)).

## 0.19.5

- Keep the default WebGPU bridge assets at `v0.1.83` (unchanged from 0.19.4).
Expand Down
5 changes: 3 additions & 2 deletions lib/src/backends/litert_lm/litert_lm_c_api_version.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'dart:ffi';
import 'package:ffi/ffi.dart';

import '../../core/exceptions.dart';
import '../../hook/native_release_pins.dart';

typedef _GetApiVersionNative =
Int Function(Pointer<Int>, Pointer<Int>, Pointer<Int>);
Expand All @@ -26,7 +27,7 @@ typedef _GetApiVersionDart =
if (status != 0 || parts[0] != 1 || parts[1] != 0 || parts[2] < 0) {
throw LlamaUnsupportedException(
'LiteRT-LM rejects C API ${parts[0]}.${parts[1]}.${parts[2]} (version probe status $status). '
'Use the packaged litert-lm-native v0.19.1-2 runtime with supported C API 1.0.x. '
'Use the packaged litert-lm-native $liteRtLmReleaseTag runtime with supported C API 1.0.x. '
'See https://github.com/leehack/llamadart/issues/1677 for the admitted ABI contract. '
'No legacy engine call was attempted.',
);
Expand Down Expand Up @@ -74,7 +75,7 @@ void requireLiteRtLmLegacyCApi(DynamicLibrary library) {
throw LlamaUnsupportedException(
'Native LiteRT-LM C API $version is incompatible with the pre-1.0 bindings. '
'Use the default LiteRtLmRuntimeClient or LiteRtLmService to select the '
'admitted C API 1.0.x route for the packaged litert-lm-native v0.19.1-2 '
'admitted C API 1.0.x route for the packaged litert-lm-native $liteRtLmReleaseTag '
'runtime, or select a compatible legacy runtime override for these bindings. '
'See https://github.com/leehack/llamadart/issues/1677 for the admitted ABI contract. '
'No legacy engine call was attempted.',
Expand Down
2 changes: 1 addition & 1 deletion lib/src/backends/litert_lm/litert_lm_runtime.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1383,7 +1383,7 @@ class _LegacyLiteRtLmRuntimeClient extends LiteRtLmRuntimeClient {
throw LlamaUnsupportedException(
'Native JSON Schema chat requires the complete LiteRT-LM constraint-provider and thinking API. '
'Use the default LiteRtLmRuntimeClient or LiteRtLmService with the packaged '
'litert-lm-native v0.19.1-2 runtime; legacy overrides must provide this complete API '
'litert-lm-native $_litertLmReleaseTag runtime; legacy overrides must provide this complete API '
'and meet the JSON Schema qualification limits.',
);
}
Expand Down
3 changes: 2 additions & 1 deletion lib/src/backends/litert_lm/litert_lm_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import '../../core/models/inference/model_params_runtime_support.dart';
import '../../core/models/inference/tool_choice.dart';
import '../../core/models/model_format.dart';
import '../../core/template/chat_template_engine.dart';
import '../../hook/native_release_pins.dart';
import '../backend.dart';
import '../native/model_format_probe.dart';
import 'litert_lm_bundle_template.dart';
Expand Down Expand Up @@ -704,7 +705,7 @@ class LiteRtLmService {
if (!client.supportsJsonSchemaConstraints) {
throw LlamaUnsupportedException(
'Native JSON Schema chat requires all constraint-provider and thinking-config symbols. '
'Use the packaged LiteRT-LM v0.19.1-2 runtime through the default ABI-selecting client; '
'Use the packaged LiteRT-LM $liteRtLmReleaseTag runtime through the default ABI-selecting client; '
'model and platform qualification still applies.',
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ library;
import 'dart:ffi';
import 'dart:io';

import 'package:llamadart/src/hook/native_release_pins.dart';
import 'package:llamadart/src/backends/litert_lm/litert_lm_c_api_version.dart';
import 'package:llamadart/src/backends/litert_lm/litert_lm_runtime.dart';
import 'package:llamadart/llamadart.dart';
Expand Down Expand Up @@ -119,7 +120,7 @@ void main() {
.having(
(error) => error.message,
'repair',
contains('litert-lm-native v0.19.1-2'),
contains('litert-lm-native $liteRtLmReleaseTag'),
)
.having(
(error) => error.message,
Expand Down
3 changes: 2 additions & 1 deletion test/unit/backends/litert_lm/litert_lm_service_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import 'dart:typed_data';

import 'package:dinja/dinja.dart';
import 'package:llamadart/llamadart.dart' as api;
import 'package:llamadart/src/hook/native_release_pins.dart';
import 'package:llamadart/src/backends/backend.dart';
import 'package:llamadart/src/backends/litert_lm/litert_lm_bundle_template.dart';
import 'package:llamadart/src/backends/litert_lm/litert_lm_cache.dart';
Expand Down Expand Up @@ -295,7 +296,7 @@ void main() {
.having(
(error) => error.message,
'current runtime',
contains('packaged LiteRT-LM v0.19.1-2 runtime'),
contains('packaged LiteRT-LM $liteRtLmReleaseTag runtime'),
)
.having(
(error) => error.message,
Expand Down
2 changes: 2 additions & 0 deletions website/docs/changelog/recent-releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ validate against the exact release tag notes.

## Unreleased

- LiteRT-LM unsupported-runtime errors name the pinned runtime tag (`v0.19.1-3`) instead of `v0.19.1-2` ([#1861](https://github.com/leehack/llamadart/issues/1861)).

## 0.19.5

- Keep default WebGPU bridge assets at `v0.1.83` (unchanged from 0.19.4).
Expand Down
Loading