fix: revert unsupported AFC config and add diagnostic logging for VIN decode (refs #231)
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 12m33s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 52s
Deploy to Staging / Verify Staging (pull_request) Successful in 9s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 8s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped

- Remove AutomaticFunctionCallingConfig(max_remote_calls=3) which caused
  pydantic validation error on the installed google-genai version
- Log full Gemini raw JSON response in OCR engine for debugging
- Add engine/transmission to backend raw values log
- Add hasTrim/hasEngine/hasTransmission to decode success log

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Eric Gullickson
2026-02-28 21:16:56 -06:00
parent 1add6c8240
commit 56df5d48f3
3 changed files with 12 additions and 3 deletions

View File

@@ -416,7 +416,10 @@ export class VehiclesController {
userId,
hasYear: !!decodedData.year.value,
hasMake: !!decodedData.make.value,
hasModel: !!decodedData.model.value
hasModel: !!decodedData.model.value,
hasTrim: !!decodedData.trimLevel.value,
hasEngine: !!decodedData.engine.value,
hasTransmission: !!decodedData.transmission.value,
});
return reply.code(200).send(decodedData);

View File

@@ -679,7 +679,8 @@ export class VehiclesService {
logger.debug('VIN decode raw values', {
vin: response.vin,
year: sourceYear, make: sourceMake, model: sourceModel,
trim: sourceTrim, confidence: response.confidence
trim: sourceTrim, engine: sourceEngine, transmission: sourceTransmission,
confidence: response.confidence
});
// Year is always high confidence if present (exact numeric match)

View File

@@ -398,7 +398,12 @@ class GeminiEngine:
vin,
)
logger.info("Gemini decoded VIN %s (confidence=%.2f)", vin, raw.get("confidence", 0))
logger.info(
"Gemini decoded VIN %s (confidence=%.2f) raw=%s",
vin,
raw.get("confidence", 0),
json.dumps(raw, default=str),
)
return VinDecodeResult(
year=resolved_year if resolved_year else raw.get("year"),