WORKFLOW SNAPSHOT
- Validate how your application handles a timeout, reconnect, and successful response through a supported route.
- Suggested starting behavior: Static assignment
- Validate the real application and destination
A practical AI application connectivity workflow
Validate how your application handles a timeout, reconnect, and successful response through a supported route.
- Use a small fixed test prompt without private user data.
- Record request identifiers and redacted timing information.
- Assert the application’s retry budget and error handling.
Why keep AI application recovery tests on a stable assignment?
Keep the route stable while testing timeouts, reconnects and successful responses. Use a fixed non-sensitive fixture so model variation does not become the explanation for a network change. Routing and model-output quality are independent variables.
What should an AI client prove before increasing request volume?
A proxy does not improve model quality or remove service limits. Unbounded retries can duplicate work and consume usage without fixing a network issue.
Test response completeness and application recovery in addition to basic connectivity.
Verify the AI application connectivity connection boundary
Record the client version, completion state, redacted request identifier and retry budget. An uncertain timeout after submission may represent work that already completed; unbounded retries can multiply usage without resolving the failure.
Check an AI client's deterministic JSON fixture
Fetch a deterministic AI-client fixture and record the HTTP response before testing timeout and reconnect handling in the application.
- 01Generate your endpoint
Choose HTTP / HTTPS and Sticky session for the complete workflow in Configure proxies.
- 02Set your proxy URL
Set
PS_PROXY_URLtohttp://USERNAME:PASSWORD@HOST:PORTusing your generated endpoint. For IP authentication, whitelist your machine and usehttp://HOST:PORT. Percent-encode special characters in credentials; these are proxy credentials, separate from your account password or API key. - 03Choose the destination
Set
Example URL · replace placeholders with your targetPS_TARGET_URLbefore running the code. Use an existing read-only JSON fixture that your AI application team controls or has approved, with a deterministic non-sensitive body and no secret query parameters.https://example.com/qa/ai-client-response.jsonSet PS_EXPECT_TEXT to the deterministic expected result or fixture version. This optional check inspects the returned text without running JavaScript.
Python 3.10+ · python -m pip install requests · python ps_ai_dev.py# Fetch a deterministic AI-client fixture and record the HTTP response before testing timeout and reconnect handling in the application.
# Use an existing read-only JSON fixture that your AI application team controls or has approved, with a deterministic non-sensitive body and no secret query parameters.
import hashlib
import json
import os
import time
from pathlib import Path
from urllib.parse import urlsplit
import requests
class InspectSession(requests.Session):
# Leave redirect bodies streamed instead of preparing the next request.
def resolve_redirects(self, *args, **kwargs):
return iter(())
proxy = os.environ["PS_PROXY_URL"] # HTTP endpoint from ProxySight
target = os.environ["PS_TARGET_URL"] # https://example.com/qa/ai-client-response.json
if urlsplit(proxy).scheme != "http":
raise ValueError("Use your generated HTTP proxy endpoint for this example.")
if urlsplit(target).scheme not in ("http", "https"):
raise ValueError("PS_TARGET_URL must be an HTTP or HTTPS URL.")
with InspectSession() as client:
client.trust_env = False # No ambient proxy, NO_PROXY or netrc overrides
started = time.monotonic()
with client.get(
target,
proxies={"http": proxy, "https": proxy},
headers={"Accept-Language": "en-US,en;q=0.9"},
timeout=(10, 20), allow_redirects=False, stream=True,
) as response:
body = bytearray()
for chunk in response.iter_content(16384):
body.extend(chunk)
if len(body) > 1048576:
raise RuntimeError("Response exceeds this example's 1 MiB limit.")
Path("ai-client-baseline.json").write_bytes(body)
print(json.dumps({
"workflow": "ai-dev", "status": response.status_code,
"elapsed_ms": round((time.monotonic() - started) * 1000),
"bytes": len(body), "sha256": hashlib.sha256(body).hexdigest(),
"headers": {name: response.headers.get(name) for name in ['Content-Type', 'Retry-After', 'X-RateLimit-Remaining']},
}, indent=2))
expected = os.getenv("PS_EXPECT_TEXT", "")
if expected:
text = body.decode(response.encoding or "utf-8", errors="replace")
print("Expected text:", "found" if expected in text else "absent")
# A 200 status alone does not prove the intended page was returned.
# Inspect redirects, login prompts, 403 and 429 before another request.
Verify the expected fixture value, JSON structure and completion of the saved body. One successful GET does not inject a timeout, exercise retries, consume a model stream or evaluate answer quality; run those cases through the actual application with its supported client configuration.
Response bodies are limited to 1 MiB for a small diagnostic. TLS verification stays enabled; redirects are left for you to inspect. Connection guide
Example: test timeout and recovery with a deterministic fixture
Use a fixed non-sensitive input, a named model configuration where relevant, and a small bounded request budget. Separate connection failure, incomplete response, and application assertion failures.
An uncertain response should not trigger unlimited retries. Record completion and available request identifiers so the application can distinguish a failed connection from work that may already have completed.
{
"fixture": "NON_SENSITIVE_FIXTURE",
"client_version": "RECORD_VERSION",
"completion": "RECORD_STATE",
"retry_count": "RECORD_COUNT"
}AI application connectivity verification checklist
For this AI application connectivity workflow, record fixture, network and recovery alongside the actual result. Use the evidence below to decide whether another observation is comparable before increasing the workload.
| Checkpoint | Hold constant or record | Expected evidence |
|---|---|---|
| Fixture | Fixed input and model settings | Comparable request |
| Network | Client, timeout, and route | Connection behavior observed |
| Recovery | Retry budget and completion state | Predictable application handling |
Troubleshoot AI application connectivity results and connection errors
| Symptom | Check next | What the result tells you |
|---|---|---|
| Output changes | Compare model and input settings | Not necessarily routing |
| Timeout after submission | Inspect completion and identifiers | Work may have been performed |
| Retries multiply | Check budget and stopping rule | Application control issue |
Measure AI request completion and retry behavior separately
Run one bounded fixture through the application’s real client stack. Assert expected recovery behavior and count attempts. Compare the same scenario directly and through the supported endpoint, separating connection failure, incomplete response and an application assertion failure.
A LITTLE CLARITY
Common questions.
Will rotating exits improve AI response quality?
No. Routing and model output quality are separate concerns.
What is the useful distinction between the two AI use-case guides?
This guide tests application connectivity and recovery; the research-data guide covers provenance, data rights, and ingestion quality.
What should an AI client prove before increasing request volume?
Record the client version, completion state, redacted request identifier and retry budget. An uncertain timeout after submission may represent work that already completed; unbounded retries can multiply usage without resolving the failure.