add schema level embedding model selection#73
Conversation
There was a problem hiding this comment.
3 issues found across 53 files
Note: This PR contains a large number of files. During the trial, cubic reviews up to 50 files per PR. Paid plans get a higher limit.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="crates/omnigraph-compiler/src/catalog/schema_plan.rs">
<violation number="1" location="crates/omnigraph-compiler/src/catalog/schema_plan.rs:85">
P2: Custom agent: **Flag AI Slop and Fabricated Changes**
New embedding-model migration behavior is added without corresponding test coverage for the new step kinds.</violation>
</file>
<file name="crates/omnigraph-cli/src/embed.rs">
<violation number="1" location="crates/omnigraph-cli/src/embed.rs:186">
P3: Custom agent: **Flag AI Slop and Fabricated Changes**
Behavior-changing model-selection logic was added without regression tests covering the new acceptance/rejection path or the runtime model forwarding path.</violation>
</file>
<file name="crates/omnigraph/src/embedding.rs">
<violation number="1" location="crates/omnigraph/src/embedding.rs:446">
P2: Custom agent: **Flag AI Slop and Fabricated Changes**
Behavior-change PR adds model selection, but tests only cover the default model path and do not validate selectable-model behavior.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
| @@ -62,6 +62,15 @@ pub enum SchemaMigrationStep { | |||
| property_name: String, | |||
There was a problem hiding this comment.
P2: Custom agent: Flag AI Slop and Fabricated Changes
New embedding-model migration behavior is added without corresponding test coverage for the new step kinds.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At crates/omnigraph-compiler/src/catalog/schema_plan.rs, line 85:
<comment>New embedding-model migration behavior is added without corresponding test coverage for the new step kinds.</comment>
<file context>
@@ -73,11 +82,18 @@ pub fn plan_schema_migration(
desired: &SchemaIR,
) -> Result<SchemaMigrationPlan> {
let mut steps = Vec::new();
+ let changed_embedding_model = accepted.config.embedding_model != desired.config.embedding_model;
+ if changed_embedding_model {
+ steps.push(SchemaMigrationStep::UpdateSchemaConfig {
</file context>
| @@ -7,8 +7,11 @@ use serde_json::{Value, json}; | |||
| use tokio::time::sleep; | |||
There was a problem hiding this comment.
P2: Custom agent: Flag AI Slop and Fabricated Changes
Behavior-change PR adds model selection, but tests only cover the default model path and do not validate selectable-model behavior.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At crates/omnigraph/src/embedding.rs, line 446:
<comment>Behavior-change PR adds model selection, but tests only cover the default model path and do not validate selectable-model behavior.</comment>
<file context>
@@ -398,17 +424,26 @@ mod tests {
#[test]
fn gemini_request_uses_preview_model_retrieval_query_and_dimension() {
- let request = build_gemini_request("alpha", 4, QUERY_TASK_TYPE);
+ let request = build_gemini_request("alpha", DEFAULT_EMBEDDING_MODEL, 4, QUERY_TASK_TYPE);
assert_eq!(request["model"], "models/gemini-embedding-2-preview");
assert_eq!(request["taskType"], QUERY_TASK_TYPE);
</file context>
| @@ -6,10 +6,13 @@ use std::path::{Path, PathBuf}; | |||
| use clap::Args; | |||
There was a problem hiding this comment.
P3: Custom agent: Flag AI Slop and Fabricated Changes
Behavior-changing model-selection logic was added without regression tests covering the new acceptance/rejection path or the runtime model forwarding path.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At crates/omnigraph-cli/src/embed.rs, line 186:
<comment>Behavior-changing model-selection logic was added without regression tests covering the new acceptance/rejection path or the runtime model forwarding path.</comment>
<file context>
@@ -180,10 +183,11 @@ pub(crate) fn resolve_embed_job(args: &EmbedArgs) -> Result<EmbedJob> {
};
- if spec.model != DEFAULT_EMBED_MODEL {
+ if embedding_model_by_name(&spec.model).is_none() {
bail!(
- "only {} is supported for explicit seed embeddings right now",
</file context>
No description provided.