Skip to content

Commit 1d9cf5e

Browse files
committed
test onboarding (attemp to fix 5)
1 parent 41fb29d commit 1d9cf5e

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

app/api/v1/endpoints/ai.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
@router.get("/health", summary="AI service availability check")
1010
async def ai_health():
1111
try:
12-
async with httpx.AsyncClient(verify=settings.httpx_verify, timeout=10.0) as client:
12+
async with httpx.AsyncClient(verify=settings.httpx_verify, timeout=10.0, trust_env=False) as client:
1313
response = await client.get(f"{settings.AI_SERVICE_URL}/health")
1414
response.raise_for_status()
1515
data = response.json()

app/api/v1/endpoints/chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ async def send_message(request: ChatRequest) -> ChatResponse:
6464

6565
# AI LLM отвечает до 60 сек — таймаут 90 с запасом
6666
try:
67-
async with httpx.AsyncClient(verify=settings.httpx_verify, timeout=90.0) as client:
67+
async with httpx.AsyncClient(verify=settings.httpx_verify, timeout=90.0, trust_env=False) as client:
6868
response = await client.post(
6969
f"{settings.AI_SERVICE_URL}/ai/process", json=payload
7070
)

app/api/v1/endpoints/onboarding.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ async def onboarding_step(request: OnboardingRequest) -> OnboardingResponse:
7171
)
7272

7373
try:
74-
async with httpx.AsyncClient(verify=settings.httpx_verify, timeout=60.0) as client:
74+
async with httpx.AsyncClient(verify=settings.httpx_verify, timeout=60.0, trust_env=False) as client:
7575
response = await client.post(
7676
f"{settings.AI_SERVICE_URL}/ai/onboarding",
7777
json={
@@ -106,7 +106,7 @@ async def onboarding_step(request: OnboardingRequest) -> OnboardingResponse:
106106

107107
async def _save_profile(db, login: str, ai_user_id: str) -> None:
108108
try:
109-
async with httpx.AsyncClient(verify=settings.httpx_verify, timeout=5.0) as client:
109+
async with httpx.AsyncClient(verify=settings.httpx_verify, timeout=5.0, trust_env=False) as client:
110110
response = await client.get(
111111
f"{settings.AI_SERVICE_URL}/ai/onboarding/{ai_user_id}/status"
112112
)

0 commit comments

Comments
 (0)