feat: AI auto-fix + Gemini Flash provider #93

Merged
chihlasm merged 14 commits from feat/ai-autofix-gemini into main 2026-02-27 07:32:24 +00:00
Showing only changes of commit 0fb3126fd2 - Show all commits

View File

@@ -195,6 +195,7 @@ async def scaffold(
detail=f"AI returned invalid output: {e}",
)
except Exception as e:
logger.exception("AI scaffold failed: %s: %s", type(e).__name__, e)
await record_ai_usage(
user_id=current_user.id,
account_id=current_user.account_id,
@@ -213,7 +214,7 @@ async def scaffold(
await db.commit()
raise HTTPException(
status_code=status.HTTP_502_BAD_GATEWAY,
detail="AI provider error. Please try again.",
detail=f"AI provider error ({type(e).__name__}). Please try again.",
)
# Record successful usage
@@ -314,6 +315,7 @@ async def branch_detail(
detail=f"AI returned invalid output: {e}",
)
except Exception as e:
logger.exception("AI branch_detail failed: %s: %s", type(e).__name__, e)
await record_ai_usage(
user_id=current_user.id,
account_id=current_user.account_id,
@@ -332,7 +334,7 @@ async def branch_detail(
await db.commit()
raise HTTPException(
status_code=status.HTTP_502_BAD_GATEWAY,
detail="AI provider error. Please try again.",
detail=f"AI provider error ({type(e).__name__}). Please try again.",
)
# Record successful usage