Skip to content

Harden provider URLs, response parsing, and tool execution - #67

Merged
luckenco merged 15 commits into
mainfrom
review-fixes
Apr 27, 2026
Merged

Harden provider URLs, response parsing, and tool execution#67
luckenco merged 15 commits into
mainfrom
review-fixes

Conversation

@luckenco

@luckenco luckenco commented Feb 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • add explicit tool execution guardrails for per-turn call limits, concurrency limits, and tool timeouts
  • run generated synchronous #[tool] functions on Tokio's blocking pool so configured timeouts can still fire
  • reject insecure provider base URLs by default, with explicit opt-in helpers for local HTTP endpoints
  • harden OpenAI Responses and completion parsing with tagged deserialization, unknown-field rejection, complete output aggregation, redacted tool-argument parse errors, and function-call round-trip coverage
  • add dependency-audit CI with a committed Cargo.lock
  • update audited transitive dependencies (bytes, rustls-webpki) so the new audit job passes
  • reduce duplicated builder/provider and macro naming logic, trim unused dependencies, and document repo/MSRV expectations

Review fixes

  • document why FunctionToolCall.r#type needs a serde default
  • replace the misleading deserialization test with focused variant-selection and serialization tests
  • preserve sequential vs parallel tool-call behavior while enforcing the new local guard limits
  • document partial-failure semantics for parallel tool execution
  • keep generated sync tool execution timeout-friendly, including context-backed tools

Validation

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features -- -Dwarnings
  • cargo test --all --verbose
  • cargo test --all --examples --verbose
  • cargo audit

Notes

  • Example binaries were compiled through the example test harness; live example execution requires provider API keys.

…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
@luckenco luckenco changed the title Refactor providers and harden tool/response handling Harden provider URLs, tool execution, and responses Apr 26, 2026
@luckenco luckenco self-assigned this Apr 26, 2026
@luckenco luckenco changed the title Harden provider URLs, tool execution, and responses Harden provider URLs, response parsing, and tool execution Apr 27, 2026
@luckenco
luckenco merged commit c088569 into main Apr 27, 2026
3 checks passed
@luckenco
luckenco deleted the review-fixes branch July 16, 2026 08:22
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