Fix OpenAI embedding config using wrong JSON key for model field#565
Conversation
The OpenAIEmbeddingConfig struct used `defaultModel` as its JSON tag, but the system console and existing saved configs use `embeddingModel`. This caused the model field to deserialize as empty, breaking embedding requests for OpenAI and OpenAI-compatible providers.
🤖 LLM Evaluation ResultsOpenAI
❌ Failed EvaluationsShow 1 failuresOPENAI1. TestReactEval/[openai]_react_cat_message
Anthropic
❌ Failed EvaluationsShow 1 failuresANTHROPIC1. TestReactEval/[anthropic]_react_cat_message
This comment was automatically generated by the eval CI pipeline. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughUpdated the JSON configuration parameter name for OpenAI embedding model from Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment Tip CodeRabbit can generate a title for your PR based on the changes.Add |
Summary
OpenAIEmbeddingConfigstruct introduced in the Bifrost migration (Migration to Bifrost #484) useddefaultModelas its JSON tag, but the system console and existing saved configs useembeddingModel. This caused the model field to deserialize as empty, breaking embedding requests for OpenAI and OpenAI-compatible providers.OpenAIEmbeddingConfigandBifrostEmbeddingConfigto catch field mismatches.Test plan
TestEmbeddingConfigJSONKeyspassesSummary by CodeRabbit
Breaking Changes
defaultModeltoembeddingModel. Users with existing configurations must update their configuration files accordingly.Tests