Last reviewed: 2026-07-14.

Direct answer

Before fallback traffic uses CometAPI, run a small contract smoke test that verifies four things: the configured base URL is https://api.cometapi.com/v1, the request uses bearer-token authorization, the selected endpoint matches the workload, and the response or error shape is logged without assuming model availability, price, quota, latency, or uptime.

Use the chat completions reference when the route is built around multi-message chat. Use the Responses reference when the route depends on stateful responses, built-in tools, multimodal inputs, or reasoning controls. For a broader fallback checklist, pair this with Build a CometAPI Fallback Evidence Checklist .

Reader next step: Start with CometAPI after confirming the route contract below.

Smoke-test workflow

Setup assumptions:

  • Store the credential outside source code and inject it as <API_KEY_PLACEHOLDER> at runtime.
  • Choose one non-production model identifier from the current CometAPI model list before the test.
  • Run the request from the same service path that fallback routing would use, but keep traffic volume minimal.

Happy-path request plan:

  1. Send one request to https://api.cometapi.com/v1/chat/completions if the route uses chat-style messages, or to https://api.cometapi.com/v1/responses if the route uses the Responses contract.
  2. Include Authorization: Bearer <API_KEY_PLACEHOLDER> and Content-Type: application/json.
  3. Use a harmless placeholder prompt and a model identifier selected from current documentation or dashboard state.
  4. Record the endpoint, request class, HTTP status, response object type, selected model identifier, and whether the minimum expected output field is present.

Error-path check:

  • Repeat the request with an intentionally invalid placeholder credential in a sandbox environment and verify that the client records an authorization failure without triggering fallback promotion.

Minimum assertions:

  • Base URL equals the documented CometAPI API base.
  • Endpoint path matches the route type being tested.
  • Authorization is sent as a bearer token.
  • Success and authorization-failure responses are both captured with request IDs or equivalent diagnostic fields when present.
  • Fallback routing remains disabled unless the contract check passes.

Do not assert:

  • Exact pricing, account balance, rate limits, uptime, latency targets, model availability, or provider-specific parameter behavior unless those details are verified from the linked source at test time.

Sanitized log-record template:

{
  "checked_at": "2026-07-14T00:00:00Z",
  "route_name": "fallback_route_placeholder",
  "endpoint": "https://api.cometapi.com/v1/<endpoint-placeholder>",
  "auth_mode": "bearer_token",
  "credential_source": "runtime_secret_placeholder",
  "http_status": "<status-placeholder>",
  "response_object": "<object-placeholder>",
  "request_id_present": "<true-or-false>",
  "fallback_decision": "hold_or_promote_placeholder",
  "operator_notes": "sanitized observation only"
}

Who this is for

This guide is for engineers who own LLM gateway routing, fallback promotion, incident reproduction, or release checks for CometAPI-backed routes. It is especially useful when the failure mode could be a bad base URL, missing bearer token, wrong endpoint family, or unverified response contract rather than a provider outage.

Key takeaways

  • Verify the base URL and bearer-token authorization before diagnosing fallback behavior.
  • Keep chat completions and Responses routes separate in smoke tests because their request and response contracts differ.
  • Log both success and authorization failure paths with sanitized fields.
  • Treat pricing, model availability, limits, and performance as separate checks that require fresh account or documentation evidence.
  • Do not promote fallback traffic from a single green request; promote only when the route contract and operational evidence agree.

Failure modes

  • Evidence gap: the agent cannot inspect the failing log, source page, pull request, or local command output. The safe action is to stop and record the missing evidence instead of guessing.
  • Scope drift: the agent edits files that are not connected to the observed failure. Keep the repair tied to the failing signal and leave unrelated cleanup for a separate task.
  • Environment mismatch: the local check uses different versions, credentials, feature flags, or runtime settings than the hosted path. Record the mismatch before treating the result as proof.
  • Unreviewed fallback: the agent changes models, endpoints, permissions, or retry behavior to make a run pass without preserving the review boundary. Treat access and provider failures as operational blockers, not topic failures.
  • Weak handoff: the final note says the issue is fixed but omits the command, result, changed files, and remaining uncertainty. That makes the next operator repeat the investigation.

Sources checked

Contract details to verify

AreaWhat to verifySource URLAccessedSafe candidate wording
Base URLThe client points to the documented CometAPI API base before sending fallback traffic.https://apidoc.cometapi.com/2026-07-14“Configure the client with the documented CometAPI base URL before route testing.”
Chat completions routeChat-style fallback traffic uses the chat completions endpoint and records the response or documented error shape.https://apidoc.cometapi.com/api/text/chat2026-07-14“Use the chat completions reference for multi-message chat routes.”
Responses routeStateful, tool, multimodal, or reasoning-oriented routes use the Responses reference when that endpoint is selected.https://apidoc.cometapi.com/api/text/responses2026-07-14“Use the Responses reference for routes that depend on the Responses contract.”
AuthorizationRequests include bearer-token authorization and failures are captured without exposing credentials.https://apidoc.cometapi.com/api/text/responses2026-07-14“Send bearer-token authorization from a runtime secret and log only sanitized failure evidence.”
Escalation evidenceOperators preserve request logs and contact support when credential, maintenance, or request-volume evidence points outside the application.https://apidoc.cometapi.com/support/help-center2026-07-14“Escalate with sanitized request evidence when local route checks do not explain the failure.”

FAQ

Should a fallback route promote after one successful CometAPI request?

No. A single success only confirms that one request path worked at one point in time. Promotion should also require clean authorization evidence, the expected endpoint family, safe error handling, and route-level logs.

Can the same smoke test cover chat completions and Responses traffic?

Use a shared checklist, but keep separate request plans. Chat completions and Responses have different endpoint paths and response contracts, so the minimum assertions should name the endpoint family being tested.

What should the authorization failure test prove?

It should prove that the client sends bearer-token authorization, captures the failure safely, avoids credential exposure, and does not treat an authorization failure as a reason to promote fallback traffic.

What should operators leave out of the smoke-test log?

Leave out real credentials, full prompts, full generated responses, exact prices, account balances, rate limits, uptime claims, and model availability claims unless those details are separately verified and needed for the incident record.

When should support evidence be collected?

Collect support-ready evidence when local checks show the base URL, endpoint, and authorization are configured correctly but the route still fails in a way that requires account, request-volume, maintenance, or credential-safety review.