Skip to content

Release v0.1.2: Test improvements#13

Merged
yfedoseev merged 6 commits intomainfrom
release/0.1.2
Jan 14, 2026
Merged

Release v0.1.2: Test improvements#13
yfedoseev merged 6 commits intomainfrom
release/0.1.2

Conversation

@yfedoseev
Copy link
Copy Markdown
Owner

Summary

This release includes incremental improvements to test code quality and debugging experience.

Changes

  • Test Assertions (10 improvements)

    • Enhanced panic messages with actual vs expected output
    • Fixed across 5 provider files: ollama, anthropic, openai, groq, ai21
    • Improved debugging when tests fail
  • Documentation

    • Added v0.1.2 release notes to CHANGELOG

Testing

  • ✅ All tests compile and pass
  • ✅ No changes to core functionality
  • ✅ Backward compatible

Next Steps

  • Future releases (v0.1.3+) will continue fixing remaining test panics (35+ across 25 providers)
  • Focus will shift to performance optimizations and feature additions once test infrastructure is fully hardened

Labels

Replace unhelpful panic!("message") calls with panic!("message, got {:?}", actual)
to provide actual vs expected information in test failures.

This improves debuggability of test assertions across 5 providers:
- ollama.rs: 2 panics fixed (text content, tool use)
- anthropic.rs: 2 panics fixed (system content handling)
- openai.rs: 3 panics fixed (response format validation)
- groq.rs: 1 panic fixed (tool use content)
- ai21.rs: 2 panics fixed (text and tool use content)

Remaining: 35+ similar panics in 25 other providers to be fixed
in follow-up commits for consistency.
Document improvements made in v0.1.2:
- Enhanced test assertion messages across 5 provider files
- 10 panic message improvements for better debugging
- All core functionality remains stable
Replace unhelpful panic!("message") calls with panic!("message, got {:?}", actual)
to provide actual vs expected information in test failures.

Fixed across 18 provider files:
- aleph_alpha.rs, cerebras.rs, cloudflare.rs, clova.rs: text content (4 files)
- cohere.rs, huggingface.rs: text and tool use (2 files)
- databricks.rs, fireworks.rs, nlp_cloud.rs, sambanova.rs, watsonx.rs: text content (5 files)
- maritaca.rs, openrouter.rs, writer.rs, yandex.rs: text content (4 files)
- mistral.rs, replicate.rs: mixed content types (2 files)
- anthropic.rs, openai.rs, groq.rs, ai21.rs: from prior commit (already included)

Total: 23 files with 31 panic improvements
Remaining: 17 panics in 7 files (deepseek, runpod, baseten, azure,
openai_compatible, openai_realtime, streaming_multiplexer)
…ultiplexer

- Fix 3 panics in openai_realtime.rs: SessionCreated, Error, RateLimitUpdated
  Replace unhelpful panic messages with actual variant values for debugging
- Fix 2 panics in streaming_multiplexer.rs: text delta and chunk reception
  Add actual values to panic output for better test failure diagnosis
- Apply consistent pattern across all remaining files

This completes v0.1.2 panic improvements (46 total across 30 provider files)
…cript

- Add .pre-commit-config.yaml with checks for all three languages:
  * Rust: cargo fmt, clippy, cargo check
  * Python: black, ruff, mypy
  * TypeScript/JavaScript: biome (unified formatting and linting)
  * General: trailing whitespace, file endings, YAML/TOML/JSON validation
  * Spell checking: codespell with common term exceptions

- Add biome.json configuration for consistent TypeScript/JavaScript formatting
  * Single quotes, 2-space indent, 100-char line width
  * Enabled recommended linting rules

- Update CONTRIBUTING.md with detailed pre-commit setup and troubleshooting
  * Installation and usage instructions
  * Per-language command examples
  * Troubleshooting common issues
  * Updated PR checklist to include pre-commit verification

This ensures code quality consistency across all three languages and automates
quality checks before commits, improving developer experience and code standards.
- Update version to 0.1.2 in:
  * Cargo.toml (Rust)
  * llmkit-python/pyproject.toml (Python)
  * llmkit-node/package.json (TypeScript)

- Add comprehensive CHANGELOG.md documenting v0.1.2 changes:
  * 46 test panic improvements across 30 provider files
  * Pre-commit hooks for Rust, Python, TypeScript
  * Enhanced developer documentation
  * Biome configuration for unified formatting
  * All improvements to code quality and infrastructure
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This release enhances test code quality and debugging experience through improved panic messages across provider tests, and introduces automated code quality enforcement through pre-commit hooks and tooling configurations.

Changes:

  • Enhanced 52 test panic messages across 29 provider files to include actual vs expected values for better debugging
  • Added comprehensive pre-commit hooks infrastructure for Rust, Python, and TypeScript/JavaScript
  • Version bumped to 0.1.2 across all three language bindings

Reviewed changes

Copilot reviewed 36 out of 36 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/providers/chat/*.rs (29 files) Enhanced panic messages in test assertions to show actual values received
src/streaming_multiplexer.rs Improved panic messages in streaming tests
src/providers/specialized/openai_realtime.rs Enhanced panic messages in realtime API tests
Cargo.toml Version bump to 0.1.2
llmkit-python/pyproject.toml Version bump to 0.1.2
llmkit-node/package.json Version bump to 0.1.2
.pre-commit-config.yaml New pre-commit hooks configuration for all languages
biome.json New TypeScript/JavaScript linting and formatting configuration
CONTRIBUTING.md Enhanced with pre-commit setup guide and troubleshooting
CHANGELOG.md Added v0.1.2 release notes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +48 to +52
- **Special APIs & Utilities (2 files, 5 panics fixed)**:
- `runpod.rs`: 4 panics - Text content block assertions
- `baseten.rs`: 4 panics - Text content block assertions
- `openai_realtime.rs`: 3 panics - SessionCreated, Error, RateLimitUpdated validation
- `streaming_multiplexer.rs`: 2 panics - Text delta and chunk reception
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "Special APIs & Utilities" section has inconsistencies: it states "2 files, 5 panics fixed" but then lists 4 files (runpod.rs with 4 panics, baseten.rs with 4 panics, openai_realtime.rs with 3 panics, and streaming_multiplexer.rs with 2 panics). This totals 4 files with 13 panics, not 2 files with 5 panics.

Copilot uses AI. Check for mistakes.
- **Model Registry**: Regenerated from latest crawler data (97 providers, 11,067 models)
- Updated pricing, capabilities, and benchmark data
- Synchronized with latest provider API changes
#### Test Assertions (46 panic improvements across 30 provider files)
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The count of panic improvements appears inconsistent. Based on the diffs in this PR, there are 52 panic message improvements across 29 files, but the CHANGELOG states "46 panic improvements across 30 provider files". Please verify and update the counts to match the actual changes.

Copilot uses AI. Check for mistakes.
- Formatter: 2-space indent, 100-char line width, single quotes
- Linter: Recommended rules enabled with correctness and style emphasis

## [0.1.1] - 2025-01-12
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The date for version 0.1.1 shows "2025-01-12" which is in the past relative to the current release 0.1.2 dated "2025-01-13". However, given that it's currently January 14, 2026, this date appears to be from a year ago. Please verify these dates are correct - they should likely be "2026-01-12" and "2026-01-13" respectively.

Copilot uses AI. Check for mistakes.
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [0.1.2] - 2025-01-13
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The release date shows "2025-01-13" which appears to be a year in the past. Given that it's currently January 14, 2026, this should likely be "2026-01-13".

Suggested change
## [0.1.2] - 2025-01-13
## [0.1.2] - 2026-01-13

Copilot uses AI. Check for mistakes.
- Multi-tenancy support
- Complete documentation and examples for all three languages

## [0.1.0] - 2025-01-10
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The date for version 0.1.0 shows "2025-01-10" which appears to be a year in the past. Given that it's currently January 14, 2026, this should likely be "2026-01-10".

Copilot uses AI. Check for mistakes.
- `replicate.rs`: 2 panics - Text content assertions
- Single panic fixes in: `aleph_alpha.rs`, `nlp_cloud.rs`, `yandex.rs`, `clova.rs`, `writer.rs`, `maritaca.rs`, `watsonx.rs`, `cerebras.rs`, `cloudflare.rs`, `sambanova.rs`, `databricks.rs`, `fireworks.rs`, `openrouter.rs`, `azure.rs`

- **Advanced providers (2 files, 5 panics fixed)**:
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The panic count for "Advanced providers" is incorrect. The section states "2 files, 5 panics fixed" but lists deepseek.rs with 5 panics and openai_compatible.rs with 2 panics, which totals 7 panics, not 5.

Suggested change
- **Advanced providers (2 files, 5 panics fixed)**:
- **Advanced providers (2 files, 7 panics fixed)**:

Copilot uses AI. Check for mistakes.
@yfedoseev yfedoseev merged commit ca58f3c into main Jan 14, 2026
51 checks passed
@yfedoseev yfedoseev deleted the release/0.1.2 branch January 14, 2026 08:18
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