Last reviewed: 2026-07-16
Direct answer
Treat streamed and non-streamed CometAPI calls as two separate smoke-test paths. The public CometAPI docs show a chat completions route, a generated responses route, OpenAI-compatible setup patterns, and support guidance, but they do not give an application-specific timeout budget for your system. That means the reliable move is to verify the contract shape from the docs, then record your own client-side timeout result for each path.
Use this workflow:
- Setup assumptions: the operator has a CometAPI account, an environment variable that resolves to a real key outside the test notes, a selected model ID from an approved account source, and a client that can run both a streamed and non-streamed request.
- Happy-path request plan: run one non-streamed request against the documented chat or responses route, then run one streamed request only where the linked route documentation supports streaming for the chosen API surface.
- Error-path check: repeat one request with a deliberately invalid placeholder credential such as
<API_KEY_PLACEHOLDER>in a non-production environment and confirm the client records a rejected authentication path without leaking the credential. - Minimum assertions: record whether the route returned a structured success or a structured error, whether the client timer stopped in the expected bucket, whether the response shape matched the selected route documentation, and whether retry or fallback logic stayed within your own policy.
- Pass/fail logging fields:
route_family,streaming_mode,client_timeout_bucket,result_class,http_status_observed,error_type_observed,fallback_attempted,operator_note. - What not to assert: do not infer vendor uptime, provider-wide latency, pricing, account quota, model availability, or a universal timeout limit from this smoke test.
For related routing controls, pair this check with Check CometAPI Endpoint Health Before Fallback Routing and CometAPI Timeout Evidence Pack for On-call Reviews .
The split matters because a streamed response exercises client behavior that a buffered response may never touch. A non-streamed request can complete as one response object after the service finishes work. A streamed request can involve an open connection, incremental events, partial client rendering, cancellation behavior, and a different user-facing perception of progress. Even if both requests use the same upstream account and route family, your application has to decide how long it will wait for the first useful signal, how long it will keep an open stream alive, and what it will record when a stream starts but does not finish cleanly.
Keep the smoke test small. The point is not to benchmark the provider or prove a global reliability claim. The point is to create a repeatable record that says which route family was exercised, which mode was used, what the client observed, and whether the fallback policy stayed quiet or activated.
Who this is for
This guide is for reliability engineers who already route application traffic through CometAPI and need a clean way to compare streaming and non-streaming behavior before changing fallback rules.
It is also useful when an on-call team wants a compact evidence packet: which route was tested, which mode was used, what the client observed, and what the team chose not to assume. Product engineers can use the same record before enabling streamed output in a user-facing workflow. Platform teams can use it when they want route-level confidence without changing model choices, retry limits, account configuration, or provider-specific options during the test.
The workflow assumes the team has already chosen the application feature under review. It does not choose a model, invent a timeout, or prescribe a universal retry policy. Those decisions belong to the system owner because the right timeout for a background batch job can be very different from the right timeout for an interactive chat pane.
Key takeaways
- Separate the streamed and non-streamed checks because they exercise different client handling paths.
- Use CometAPI documentation to verify route family, request shape, response shape, setup pattern, and support path.
- Keep timeout budgets as application-owned settings unless a linked source explicitly defines the value you need.
- Store sanitized smoke-test records, not prompts, credentials, full responses, prices, quotas, or availability claims.
- A clean split helps fallback owners avoid promoting traffic based on a single happy-path request.
- Compare streamed and non-streamed results side by side before changing fallback thresholds or user-facing degradation behavior.
Sanitized log-record template:
route_family: "chat_or_responses"
streaming_mode: "streamed_or_non_streamed"
client_timeout_bucket: "placeholder_bucket"
result_class: "success_or_structured_error"
http_status_observed: "placeholder_status"
error_type_observed: "placeholder_error_type"
fallback_attempted: "yes_or_no"
operator_note: "short sanitized note"
A useful pass record is boring. It should say that the client reached the intended route family, the expected mode was exercised, the result was classified without leaking content, and fallback behavior matched the team’s policy. A useful fail record is just as constrained. It should identify whether the failure happened before request dispatch, before the first streamed event, after partial output, after a timeout bucket expired, or after the client received a structured error.
Sources checked
- CometAPI documentation - accessed 2026-07-16; purpose: verify current CometAPI documentation navigation.
- CometAPI chat completions reference - accessed 2026-07-16; purpose: verify chat completion contract areas.
- CometAPI responses reference - accessed 2026-07-16; purpose: verify responses endpoint contract areas.
- CometAPI help center - accessed 2026-07-16; purpose: verify support and escalation documentation areas.
Contract details to verify
| Area | What to verify | Source URL | Accessed | Safe candidate wording |
|---|---|---|---|---|
| API family | Whether the test should use chat completions, responses, or both for the feature under review. | https://apidoc.cometapi.com/api/text/chat | 2026-07-16 | “The smoke test covers the documented chat completions route for this route family.” |
| API family | Whether the responses route is the correct surface for the selected model and feature path. | https://apidoc.cometapi.com/api/text/responses | 2026-07-16 | “The responses route is checked separately when the implementation uses that surface.” |
| Streaming mode | Whether the selected route documentation supports the streaming mode the client will exercise. | https://apidoc.cometapi.com/api/text/responses | 2026-07-16 | “Streaming is tested only where the linked route documentation supports it for the chosen path.” |
| Setup shape | Whether the client uses the documented base URL and credential pattern without recording secret values. | https://apidoc.cometapi.com/ | 2026-07-16 | “The client is configured with the documented CometAPI base URL and a secret stored outside test notes.” |
| Escalation path | Where operators should go when route behavior cannot be explained from the smoke-test record. | https://apidoc.cometapi.com/support/help-center | 2026-07-16 | “Unclear failures are packaged for support with sanitized route, mode, status, and timing evidence.” |
Do not collapse these checks into one all-purpose success label. A chat completions response and a responses result can both be successful while still requiring different client parsing and timeout notes. A streamed responses check can also produce progress before final completion, so the log should distinguish first useful signal from finished result when the client can observe both. That distinction keeps incident reviews from treating partial output, final output, and structured error paths as interchangeable.
Failure modes
- Evidence gap: the operator 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 repair changes files, models, permissions, retry settings, or route choices that are not connected to the observed timeout behavior. 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 team 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 until they are explained.
- Stream ambiguity: the client records that a streamed request started but does not distinguish first event, last event, cancellation, timeout, and final structured error. Add separate fields before changing route policy.
- Shared timeout shortcut: the team copies the non-streamed timeout into the streamed path because one happy-path check completed. That can hide a user-facing stream that opens successfully but stalls later.
- 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.
For retry and fallback context around related failures, compare this workflow with Retry Storm Guardrails for CometAPI Gateway Calls . If a timeout result causes a routing decision, record the decision with the same care used in Fallback Decision Logs for CometAPI Gateway Calls .
Reader next step
Pick one production-adjacent feature path and run a two-row timeout check before touching fallback policy. The first row should use the non-streamed route your application already depends on. The second row should use the streamed route only if the selected API surface and client implementation support streaming for that feature. Use the same account boundary, the same application client, the same selected model source, and the same sanitized prompt class for both rows.
After the run, write down three decisions. First, decide whether the streamed and non-streamed observations are comparable enough to share a policy. Second, decide whether fallback should stay unchanged, stay paused, or move forward for only one mode. Third, decide what evidence would be required before widening the test to more routes, models, or user cohorts.
If either row fails, do not immediately increase retries or widen fallback. Package the sanitized route family, streaming mode, observed status, client timeout bucket, error class, and short operator note. Then confirm the route contract against the linked docs again and use the support path only when the local evidence cannot explain the behavior.
Use Cap CometAPI Fallback Attempts per User Action as the next comparison point. Keep CometAPI chat reliability contract review nearby for setup and permission checks.
FAQ
Should streamed and non-streamed calls share one timeout threshold?
Not by default. Use separate client-side observations first, then decide whether a shared threshold is justified for your product path. A shared value may be reasonable after evidence, but it should not be the starting assumption.
Can this test prove CometAPI uptime or latency?
No. It is a route-level smoke test for your client and chosen API surface. It should not be used as a vendor-wide availability or latency claim.
Should the log include the full prompt and response?
No. Keep the record sanitized. A route family, mode, result class, observed status, timeout bucket, fallback flag, and short note are usually enough for a repeatable handoff.
What should happen after a failed streamed check?
Compare it with the non-streamed result, verify the route documentation again, and decide whether fallback should stay paused until the failure is explained. If the stream opened but did not finish, record that separately from a request that never produced a first event.
Where should teams start if they are setting up this workflow for the first time?
Start with the documented setup flow and route references, then send a low-risk application request through the same client configuration that production uses. Keep credentials outside the notes, use <API_KEY_PLACEHOLDER> only in examples, and avoid changing models, retry budgets, or routing rules during the first comparison.