Reuse datasheet family aliases and skip the LLM for catalog passives.
Store BOM MPN and orderable code on the same PDF blob, derive TI datasheet slugs from package/Q1 codes, and map LCSC/DigiKey R/C/L parameters to specs without a model call. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -883,6 +883,22 @@ async def auto_resolve_specs(
|
||||
"""
|
||||
tax_dir = taxonomy_dir or settings.taxonomy_dir
|
||||
|
||||
from backend.services.passive_from_distributor import specs_from_distributor
|
||||
|
||||
if component_type == "passive":
|
||||
direct = specs_from_distributor(
|
||||
mpn=mpn,
|
||||
params=digikey_params,
|
||||
category=digikey_category,
|
||||
description=digikey_description,
|
||||
)
|
||||
if direct is not None:
|
||||
import logging as _logging
|
||||
_logging.getLogger(__name__).info(
|
||||
"Auto-resolved %s from distributor params (no LLM)", mpn,
|
||||
)
|
||||
return direct
|
||||
|
||||
# Auto-generate type-level specs if none exist
|
||||
if not has_specs(component_type, tax_dir):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user