Skip to content

feat: updating LLM calls and other minor fixes - #116

Open
TEJASNARAYANS wants to merge 3 commits into
mainfrom
import-fixes
Open

feat: updating LLM calls and other minor fixes#116
TEJASNARAYANS wants to merge 3 commits into
mainfrom
import-fixes

Conversation

@TEJASNARAYANS

Copy link
Copy Markdown
Contributor

What Changed?

Briefly describe what this PR changes.

Why?

Explain the problem this solves and why this approach was chosen.

How to Test?

List clear steps for reviewers to verify the change.

Release Label

Select one semantic version bump intent for this PR:

  • major - breaking change, next release bumps major version
  • minor - backward-compatible feature, next release bumps minor version
  • fix - backward-compatible bug fix, next release bumps patch version
  • No label (defaults to patch release)

If you do not have permission to apply labels, mention the intended release label here and a maintainer will set it.

Checklist

  • I have read the CONTRIBUTING.md guide.
  • My code follows the project's style guidelines.
  • I have added tests that prove my fix is effective or my feature works.
  • I have updated documentation where needed.

@TEJASNARAYANS TEJASNARAYANS added the fix Fix version release label Aug 18, 2026
@greptile-apps

greptile-apps Bot commented Aug 18, 2026

Copy link
Copy Markdown

Greptile Summary

The PR updates call-import evaluation orchestration, LLM metric execution and failure handling, status reporting, and related frontend displays and tests.

  • Adds expected per-row LLM-call information to evaluation responses.
  • Updates call-import and evaluation status rollups and exposes the latest evaluation status.
  • Refines metric failure policy and worker evaluation behavior.
  • Updates call-import UI status and progress presentation.
  • Expands API, service, and worker test coverage.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains.

No blocking failure remains.

Important Files Changed

Filename Overview
app/workers/tasks/evaluate_call_import_row_core.py Adds shared LLM-configuration grouping and expected-call counting aligned with the worker鈥檚 one-call-per-configuration execution.
app/workers/tasks/evaluate_call_import_row.py Updates per-row LLM scoring to process configuration buckets and revised metric-result behavior.
app/api/v1/routes/call_import_evaluations.py Updates evaluation creation and serialization, including source-row handling and expected LLM-call metadata.
app/services/call_imports/bulk_ops.py Revises parent import rollups and latest-evaluation status mapping; the previously reported sibling trigger is no longer reachable through the current request contract.
app/api/v1/routes/call_imports.py Exposes latest evaluation status in call-import responses while retaining the previously reported per-item list lookup.
app/services/metric_failure_policy.py Refines metric failure classification used by evaluation result processing.
frontend/src/pages/callImports/CallImports.tsx Updates call-import list status presentation using the new backend evaluation-status field.
frontend/src/pages/callImports/CallImportDetail.tsx Updates evaluation progress and expected LLM-call presentation.
app/models/schemas.py Extends call-import and evaluation response contracts with latest-status and expected-call fields.

Reviews (3): Last reviewed commit: "fix: updating single metric runs" | Re-trigger Greptile

Comment on lines +351 to +366
"""Expected LLM calls per row (one per distinct LLM config among metrics)."""
configs: set[LlmConfigKey] = set()
for metric in metrics:
if (metric.name or "").strip().lower() in AUDIO_ONLY_METRIC_NAMES:
continue
configs.add(
resolve_metric_llm_config(
metric,
overrides=overrides,
run_provider=run_provider,
run_model=run_model,
run_llm_config=run_llm_config,
run_credential_id=run_credential_id,
)
)
return len(configs)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Expected call count underreports work

When selected metrics include multiple parent groups with the same LLM configuration or comparison metrics sharing a configuration, this function counts only distinct configuration tuples while the worker makes a separate call per parent group and per comparison metric, causing expected_llm_calls_per_row to report fewer calls than are actually made.

Knowledge Base Used: Call imports from source file to evaluated report

Comment on lines +948 to +949
.order_by(CallImportEvaluation.created_at.desc())
.first()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Sibling status selection is ambiguous

When production and diarised sibling evaluations created in the same transaction later have different statuses, their created_at values can tie and this query selects an arbitrary sibling as latest; the selected status then determines the parent import status, causing the batch to be reported as completed, partial, or failed inconsistently with its sibling runs.

Knowledge Base Used: Call imports from source file to evaluated report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Fix version release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant