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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ target/
.idea/
.DS_Store
docs
node_modules
node_modules
package-lock.json
pnpm-lock.yaml
yarn.lock
5 changes: 3 additions & 2 deletions iii-lsp/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion iii-lsp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name = "iii-lsp"
path = "src/main.rs"

[dependencies]
iii-sdk = { git = "ssh://git@github.com/iii-hq/iii.git" }
iii-sdk = "=0.11.3"
tower-lsp-server = "0.23"
tree-sitter = "0.24"
tree-sitter-typescript = "0.23"
Expand Down
1 change: 1 addition & 0 deletions iii-lsp/src/engine_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ impl EngineClient {
os: std::env::consts::OS.to_string(),
pid: Some(std::process::id()),
telemetry: None,
..Default::default()
}),
..Default::default()
},
Expand Down
118 changes: 116 additions & 2 deletions image-resize/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion image-resize/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ name = "image-resize"
path = "src/main.rs"

[dependencies]
iii-sdk = { version = "0.9.0", features = ["otel"] }
iii-sdk = "=0.11.3"
image = { version = "0.25", default-features = false, features = ["jpeg", "png", "webp"] }
kamadak-exif = "0.6"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "signal"] }
Expand Down
2 changes: 1 addition & 1 deletion image-resize/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dev": "node --import tsx src/index.ts"
},
"dependencies": {
"iii-sdk": "0.9.0"
"iii-sdk": "0.11.3"
},
"devDependencies": {
"tsx": "^4.21.0",
Expand Down
2 changes: 1 addition & 1 deletion image-resize/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async fn main() -> Result<()> {

let resize_handler = handler::build_handler(cli.url.clone(), config);

let _fn_ref = iii.register_function(
let _fn_ref = iii.register_function_with(
RegisterFunctionMessage {
id: "image_resize::resize".to_string(),
description: Some("Resize an image via channel I/O".to_string()),
Expand Down
2 changes: 1 addition & 1 deletion llm-router/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ name = "iii-llm-router"
path = "src/main.rs"

[dependencies]
iii-sdk = "=0.11.2"
iii-sdk = "=0.11.3"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "signal"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
Expand Down
2 changes: 1 addition & 1 deletion llm-router/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Your gateway (LiteLLM/Bifrost/OpenRouter/your-own) takes `model` and forwards. T

## SDK + stack

- `iii-sdk 0.11.0` stable
- `iii-sdk =0.11.3`
- State via `state::get`/`set`/`delete`/`list` against scope `llm-router`
- `rand` for A/B variant weighted sampling
- `serde_json` everywhere — all state blobs are JSON
Expand Down
23 changes: 16 additions & 7 deletions llm-router/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,24 +84,33 @@ mod tests {

#[test]
fn validate_rejects_out_of_range_error_rate() {
let mut c = RouterConfig::default();
c.health_skip_threshold_error_rate = 2.0;
let c = RouterConfig {
health_skip_threshold_error_rate: 2.0,
..RouterConfig::default()
};
assert!(validate(&c).is_err());
c.health_skip_threshold_error_rate = -0.1;
let c = RouterConfig {
health_skip_threshold_error_rate: -0.1,
..RouterConfig::default()
};
assert!(validate(&c).is_err());
}

#[test]
fn validate_rejects_empty_strings() {
let mut c = RouterConfig::default();
c.state_scope = "".into();
let c = RouterConfig {
state_scope: "".into(),
..RouterConfig::default()
};
assert!(validate(&c).is_err());
}

#[test]
fn validate_rejects_zero_stats_days() {
let mut c = RouterConfig::default();
c.stats_default_days = 0;
let c = RouterConfig {
stats_default_days: 0,
..RouterConfig::default()
};
assert!(validate(&c).is_err());
}
}
12 changes: 7 additions & 5 deletions llm-router/src/functions/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ pub fn handler(
// so state::list returns only entries that might match instead of
// the full audit log.
//
// Known limitation: iii-sdk 0.11.2 exposes no cursor/paginated
// state::list, so the scan still materializes a Vec before the
// hard cap applies. Track SDK-side pagination in iii-hq/iii and
// switch to a streaming scan once available. Until then the
// prefix narrowing + hard cap is the best we can do.
// Known limitation: iii-sdk 0.11.3 `state::list` takes only
// `{scope}`, so the prefix we pass is client-side-only. The
// engine returns the whole scope; we rely on `parse_item::<T>`
// type-discrimination + the `timestamp_ms < horizon` check to
// filter. scan_prefix is therefore informational (and ready for
// a future engine prefix-filter). Track pagination + prefix in
// iii-hq/iii. SCAN_HARD_CAP is the only backstop today.
let prefix = scan_prefix(horizon, now);
let items = state::state_list(&iii, &cfg.state_scope, &prefix).await?;

Expand Down
2 changes: 1 addition & 1 deletion todo-worker-python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description = "III SDK Python Todo Worker"
authors = [{ name = "III" }]
requires-python = ">=3.10"
dependencies = [
"iii-sdk",
"iii-sdk==0.11.3",
"opentelemetry-api",
"opentelemetry-sdk",
"watchfiles",
Expand Down
Loading
Loading