Skip to content

fix(dora-maas-client): update outfox-openai dependency to v0.7.0#69

Open
prabhaharanv wants to merge 1 commit intomofa-org:mainfrom
prabhaharanv:fix/dora-maas-client-outfox-openai-dep
Open

fix(dora-maas-client): update outfox-openai dependency to v0.7.0#69
prabhaharanv wants to merge 1 commit intomofa-org:mainfrom
prabhaharanv:fix/dora-maas-client-outfox-openai-dep

Conversation

@prabhaharanv
Copy link
Copy Markdown

Changes:

  • Bump outfox-openai from 0.2.0 to 0.7.0 and pin to rev 05309e0
  • Enable required "chat-completion" feature flag
  • Fix type mismatch: use ChatCompletionRequestSystemMessageContent::Text instead of PartibleTextContent::Text for system message content

📋 Summary

dora-maas-client fails to compile because outfox-openai = "^0.2.0" does not match any version in the outfox repository. The crate was renamed from novel-openai to outfox-openai starting at version 0.6.0 — version 0.2.0 never existed. This PR updates the dependency to the correct version and fixes a resulting type mismatch.

🔗 Related Issues

Closes #59


🧠 Context

The outfox-openai crate history in the outfox repo:

  • 800e8afnovel-openai v0.3.0 (initial commit)
  • 054bff5novel-openai v0.6.0
  • 175b161 — renamed to outfox-openai v0.6.0
  • 05309e0outfox-openai v0.7.0 (latest)

Since outfox-openai v0.2.0 never existed, Cargo fails immediately with:
error: failed to select a version for the requirement outfox-openai = "^0.2.0"
candidate versions found which didn't match: 0.7.0

Additionally, v0.7.0 requires the chat-completion feature flag to expose spec::chat::* types and their transitive dependency on futures. Without it, the types used by the source code are behind #[cfg] gates.


🛠️ Changes

  • Cargo.toml: Update outfox-openai from 0.2.0 to 0.7.0, pin to git rev 05309e0, and enable the chat-completion feature
  • main.rs: Add ChatCompletionRequestSystemMessageContent to imports and use it instead of PartibleTextContent::Text for the system message content field (type changed between API versions)

🧪 How you Tested

  1. cargo build --manifest-path node-hub/dora-maas-client/Cargo.toml — passes (warnings only, all pre-existing)
  2. cargo check --manifest-path node-hub/dora-maas-client/Cargo.toml — passes
  3. cargo test --manifest-path node-hub/dora-maas-client/Cargo.toml — 5 passed, 2 failed (test_chinese_character_segmentation, test_markdown_cleaning — both are pre-existing failures in segmenter::tests, unrelated to this change; the original code doesn't compile at all)

📸 Screenshots / Logs (if applicable)

Before fix:
error: failed to select a version for the requirement outfox-openai = "^0.2.0"
candidate versions found which didn't match: 0.7.0

After fix:
Finished dev profile [unoptimized + debuginfo] target(s) in 23.07s


⚠️ Breaking Changes

  • No breaking changes

🧹 Checklist

Code Quality

  • Code follows Rust idioms and project conventions
  • cargo fmt run
  • cargo clippy passes without warnings

Testing

  • Tests added/updated
  • cargo test passes locally without any error

PR Hygiene

  • PR is small and focused (one logical change)
  • Branch is up to date with main
  • No unrelated commits
  • Commit messages explain why, not only what

Documentation

  • Public APIs documented
  • README / docs updated (if needed)

🚀 Deployment Notes (if applicable)

None.


🧩 Additional Notes for Reviewers

  • The 2 test failures in segmenter::tests are pre-existing — the original main branch code doesn't compile at all due to this dependency bug, so those tests were already broken before this PR.
  • The build warnings (unused variables, dead code) are also all pre-existing.
  • cargo fmt and cargo clippy checkboxes are left unchecked because the warnings are pre-existing across the entire crate, not introduced by this change. Running cargo fmt/clippy --fix would create unrelated changes.

outfox-openai v0.2.0 never existed in the outfox repository. The crate was
first published as outfox-openai at v0.6.0 (renamed from novel-openai),
causing cargo to fail with "failed to select a version".

Changes:
- Bump outfox-openai from 0.2.0 to 0.7.0 and pin to rev 05309e0
- Enable required "chat-completion" feature flag
- Fix type mismatch: use ChatCompletionRequestSystemMessageContent::Text
  instead of PartibleTextContent::Text for system message content
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.

[Build] dora-maas-client fails during install_all_packages.sh – outfox-openai ^0.2.0 not found (repo only has 0.7.0)

2 participants