Skip to content

Refactor providers and harden tool/response handling#67

Open
luckenco wants to merge 1 commit intomainfrom
review-fixes
Open

Refactor providers and harden tool/response handling#67
luckenco wants to merge 1 commit intomainfrom
review-fixes

Conversation

@luckenco
Copy link
Owner

@luckenco luckenco commented Feb 22, 2026

Summary

  • refactor duplicated provider/build logic across core and provider modules
  • harden tagged response deserialization and restore completion loop parallel control behavior
  • simplify macro helpers and shared naming utilities
  • clean up minor issues (error typo, docs/provider listing, clone usage)

Review fixes

  • document why FunctionToolCall.r#type needs a serde default (tagged enum consumes the field during deserialization, but it's required when serializing back as an API input item)
  • replace misleading deserialization test with two focused tests: variant selection and serialize round-trip
  • inline unnecessary messages_clone variable in generate_completion
  • document partial-failure semantics on process_parallel_function_calls

Validation

  • cargo check --all --quiet
  • cargo check --all --tests --quiet
  • cargo clippy --all-targets --all-features --quiet
  • cargo test --all --tests --examples --quiet
  • cargo test -p rsai-macros --tests --quiet

Notes

  • Full cargo test --all currently fails due macro doctest linker configuration (-liconv); targeted unit/integration/examples suites above pass.

…n up client

- Add comment on FunctionToolCall.r#type explaining why serde default is
  needed (tagged enum consumes the field during deserialization)
- Replace misleading deserialization test with two focused tests: variant
  selection and serialize round-trip
- Inline unnecessary messages_clone variable in generate_completion
- Document partial-failure semantics on process_parallel_function_calls
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.

1 participant