Skip to content

chore(llm-router, provider-anthropic): conform to the worker SOPs - #258

Merged
ytallo merged 1 commit into
mainfrom
chore/sop-adapt-router-providers
Jun 15, 2026
Merged

chore(llm-router, provider-anthropic): conform to the worker SOPs#258
ytallo merged 1 commit into
mainfrom
chore/sop-adapt-router-providers

Conversation

@ytallo

@ytallo ytallo commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Brings llm-router and provider-anthropic into line with docs/sops/new-worker.md and docs/sops/binary-worker.md. Both were already shipping but skipped several SOP requirements.

Gaps closed

  • Entry point CLI contract. Both main.rs files are rewritten to the binary-worker scaffold (mirroring session-manager, the SOP's reference worker on the same SDK 0.19.2): clap with --config/--url/--manifest, tracing_subscriber init, a WorkerMetadata identity line (they previously registered anonymously), and iii.shutdown_async().await on exit. --url keeps honouring III_WS_URL as a fallback.
  • config.yaml. Both workers deliberately keep operator config in the engine's llm-router configuration entry, so each ships a committed stub documenting that. The engine passes --config <path> whenever an operator sets a config block, so the binary now warns about ignored keys instead of dropping all argv silently.
  • Release wiring. Added both workers to create-tag.yml options and release.yml tag patterns.
  • Tag-collision guard. Tags from retired predecessors still exist (llm-router/v0.1.1–v0.1.2, provider-anthropic/v0.1.0–v0.2.1). With manifests at 0.1.0 the first Create Tag run would push an already-existing tag, which fails silently. Versions are pre-bumped above those lineages — llm-router → 0.2.0, provider-anthropic → 0.3.0 — with a comment in each Cargo.toml.
  • Modules table rows for both workers, plus per-worker README updates documenting the CLI flags.
  • Permissions. The per-worker permission files said direct provider calls must never be agent-callable, but the root iii-permissions.yaml (the file the harness actually loads) had no matching rule — they fell to needs_approval. Added '!provider::*'.

Test plan

  • cargo fmt --check, cargo clippy --all-targets --all-features -- -D warnings, cargo test --all-features pass in both workers (llm-router 56 tests, provider-anthropic 76; includes new unit tests for the config-key detection).
  • --manifest | jq emits valid manifests at the new versions; --help shows the CLI contract.
  • Ran the built binary both ways: the warning fires for a keyed --config file and stays silent for the committed stub.
  • Confirmed the integration suites register in-process (only the engine is spawned), so strict clap parsing breaks no existing spawn path.

Note: this touches adjacent lines in create-tag.yml/release.yml/README.md to the provider-openai SOP change in #252, so whichever merges second will hit a trivial conflict.

Summary by CodeRabbit

  • New Features

    • Introduced llm-router and provider-anthropic worker modules.
    • Added standard CLI flag support (--url, --config, --manifest) to both modules.
    • Enabled structured logging via tracing integration.
  • Documentation

    • Updated module registry and README files with configuration guidance.
  • Chores

    • Updated module versions and added logging/CLI dependencies.

@vercel

vercel Bot commented Jun 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
workers Ready Ready Preview, Comment Jun 13, 2026 1:18pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@ytallo, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 15 minutes and 42 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9705787e-12d7-411f-9c0a-ccd8682c141f

📥 Commits

Reviewing files that changed from the base of the PR and between 84b07a1 and 033df75.

⛔ Files ignored due to path filters (2)
  • llm-router/Cargo.lock is excluded by !**/*.lock
  • provider-anthropic/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (12)
  • .github/workflows/create-tag.yml
  • .github/workflows/release.yml
  • README.md
  • iii-permissions.yaml
  • llm-router/Cargo.toml
  • llm-router/README.md
  • llm-router/config.yaml
  • llm-router/src/main.rs
  • provider-anthropic/Cargo.toml
  • provider-anthropic/README.md
  • provider-anthropic/config.yaml
  • provider-anthropic/src/main.rs
📝 Walkthrough

Walkthrough

This PR introduces two new worker modules, llm-router and provider-anthropic, into the repository with standardized CLI handling, configuration validation, structured logging, and async lifecycle management. Supporting infrastructure updates include GitHub Actions workflow registration, permission rules restricting direct provider calls, and repository documentation.

Changes

Worker Module Integration: llm-router and provider-anthropic

Layer / File(s) Summary
Workflow and permission infrastructure
.github/workflows/create-tag.yml, .github/workflows/release.yml, README.md, iii-permissions.yaml
New workers are registered in the tag-creation and release-trigger workflows, added to the README modules table, and agents are blocked from calling provider::* functions directly via a new deny rule.
llm-router worker implementation
llm-router/Cargo.toml, llm-router/README.md, llm-router/config.yaml, llm-router/src/main.rs
Version bumped to 0.2.0; dependencies added for CLI parsing (clap) and structured logging (tracing, tracing-subscriber). Main refactored to parse CLI flags (--config, --url, --manifest) via clap, validate YAML config files and warn on unexpected keys, initialize tracing, register worker with explicit metadata, and use async shutdown. Unit tests cover config key detection logic.
provider-anthropic worker implementation
provider-anthropic/Cargo.toml, provider-anthropic/README.md, provider-anthropic/config.yaml, provider-anthropic/src/main.rs
Version bumped to 0.3.0; same dependency and structural updates as llm-router. Main follows identical pattern: clap-based CLI, config validation with warning, tracing setup, provider registration with metadata, async shutdown. WebSocket URL default updated to ws://127.0.0.1:49134. Unit tests validate config key detection.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • iii-hq/workers#61: Also extends .github/workflows/create-tag.yml and .github/workflows/release.yml to register additional worker namespaces (conductor).
  • iii-hq/workers#32: Contains a prior implementation of llm-router with overlapping CLI handling, manifest behavior, and configuration approach.
  • iii-hq/workers#17: Also updates .github/workflows/create-tag.yml to extend the workflow_dispatch worker input choices.

Suggested reviewers

  • sergiofilhowz
  • andersonleal

Poem

🐰 Two workers hop into the fold with grace,
Router and provider now have their place,
Config files whisper "we're just for show,"
While clap and tracing steal the flow,
Async shutdown bids them goodbye! 🚀

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore(llm-router, provider-anthropic): conform to the worker SOPs' directly and clearly summarizes the main change—updating both workers to follow standard operating procedures with specific, meaningful context.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/sop-adapt-router-providers

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

skill-check — worker

0 verified, 18 skipped (no docs/).

Layer Result
structure
vale
ai
render

Four for four. Nicely done.

…binary-worker SOPs

- main.rs: clap CLI (--config/--url/--manifest), tracing init,
  WorkerMetadata identity, and shutdown_async on exit; --url honours
  III_WS_URL as a fallback. A --config file carrying real keys now warns
  instead of being silently ignored (operator config lives in the engine's
  llm-router configuration entry).
- config.yaml: committed stubs documenting where configuration lives.
- Release wiring: both workers added to create-tag.yml options and
  release.yml tag patterns. Versions pre-bumped (llm-router 0.2.0,
  provider-anthropic 0.3.0) above the retired predecessors' tags so the
  first Create Tag run cannot collide.
- README: Modules table rows for both workers; per-worker READMEs document
  the CLI flags.
- iii-permissions.yaml: deny provider::* — direct provider calls bypass
  the router's accounting; the router invokes them worker-to-worker.
@ytallo
ytallo merged commit 2fe66be into main Jun 15, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants