Skip to content

Volcengine Ark model fails during reconnect / recovery continuation because it does not support the coding plan feature #387

Closed

Description

@wtry

Title

Volcengine Ark model fails during reconnect / recovery continuation because it does not support the coding plan feature

Environment

  • Jcode version: v0.29.0
  • OS: macOS
  • Architecture: aarch64
  • Provider: OpenAI-compatible
  • Endpoint: https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions
  • Model: volcengine:ark-code-latest
  • Auth: ARK_API_KEY

Description

After the session reconnects successfully, Jcode attempts to continue a pending recovery directive. The continuation request fails with HTTP 404 from Volcengine Ark.

The provider error says:

The requested model does not support the coding plan feature.

It looks like Jcode sends a request that uses the coding plan feature during reconnect / recovery continuation, but the configured Ark model volcengine:ark-code-latest does not support that feature. Jcode then retries several times and eventually stops after reaching the auto-retry limit.

Steps to Reproduce

  1. Configure an OpenAI-compatible Volcengine Ark provider.
  2. Use model volcengine:ark-code-latest.
  3. Let a session disconnect or reload while a recovery directive is pending.
  4. Jcode reconnects successfully.
  5. Jcode tries to continue the pending recovery directive.
  6. The request fails with UnsupportedModel.
  7. Auto-retry reaches the limit and stops.

Actual Behavior

Jcode reconnects successfully, but recovery continuation fails repeatedly:

✓ Reconnected successfully.

Reload complete - continuing because a recovery directive was pending.

OpenAI-compatible chat request failed
  endpoint: https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions
  model: volcengine:ark-code-latest
  auth: ARK_API_KEY
  status: 404 Not Found
  response: {"error":{"code":"UnsupportedModel","message":"The requested model does not support the coding plan feature. Please refer to the documentation at https://www.volcengine.com/docs/82379/1925114 to select a compatible model. Request id: 02178177399933089a6ab5dfd15f12fdf9b1912203a3c65809198","param":"","type":""}}
Hint: check network connectivity, DNS/TLS, that the base URL includes the API version (usually /v1), and that the model exists on the provider.

╭─────── ⚡ reconnecting ────────╮
│ Retrying · attempt 3/3 · in 6s │
│ Detail ⚠ Remote request failed │
╰────────────────────────────────╯

✓ Retrying continuation... (system message)

OpenAI-compatible chat request failed
  endpoint: https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions
  model: volcengine:ark-code-latest
  auth: ARK_API_KEY
  status: 404 Not Found
  response: {"error":{"code":"UnsupportedModel","message":"The requested model does not support the coding plan feature. Please refer to the documentation at https://www.volcengine.com/docs/82379/1925114 to select a compatible model. Request id: 02178177400190989a6ab5dfd15f12fdf9b1912203a3c653785cd","param":"","type":""}}

✓ Retrying continuation... (system message)

OpenAI-compatible chat request failed
  endpoint: https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions
  model: volcengine:ark-code-latest
  auth: ARK_API_KEY
  status: 404 Not Found
  response: {"error":{"code":"UnsupportedModel","message":"The requested model does not support the coding plan feature. Please refer to the documentation at https://www.volcengine.com/docs/82379/1925114 to select a compatible model. Request id: 02178177400654189a6ab5dfd15f12fdf9b1912203a3c6553bbba","param":"","type":""}}

✓ Retrying continuation... (system message)

OpenAI-compatible chat request failed
  endpoint: https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions
  model: volcengine:ark-code-latest
  auth: ARK_API_KEY
  status: 404 Not Found
  response: {"error":{"code":"UnsupportedModel","message":"The requested model does not support the coding plan feature. Please refer to the documentation at https://www.volcengine.com/docs/82379/1925114 to select a compatible model. Request id: 02178177401319189a6ab5dfd15f12fdf9b1912203a3c658d037b","param":"","type":""}}

⚠ Remote request failed. Auto-retry limit reached after 3 attempts. Use `/poke` again to retry manually.

Activity

  1. 1jehuang commented on Jun 18, 2026

    @1jehuang
    Owner

    Triage

    Thanks for the detailed report. Two distinct things are happening here.

    Root cause (provider-side / config)

    The endpoint https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions is Volcengine Ark's coding plan endpoint, which only accepts models that support that feature. ark-code-latest is not one of them, so Ark returns:

    404 UnsupportedModel: The requested model does not support the coding plan feature.
    

    This is the same error you'd get on the very first request, not something specific to reconnect/recovery. Recovery just happens to be the moment the next request fires after reload. The immediate workaround is to either:

    • point the base URL at the standard endpoint (.../api/v3) instead of .../api/coding/v3, or
    • use a model that the coding plan endpoint actually supports (see the Ark docs link in the error).

    Jcode-side bug (the part we should fix)

    A 404 UnsupportedModel is a permanent/deterministic error: retrying the identical request can never succeed. But Jcode's remote auto-retry path treats it as worth a short retry budget and burns all attempts (attempt 3/3) before giving up, producing the noisy repeated failures you saw.

    The retry classifier (is_retryable_error in openai_stream_runtime.rs) correctly does not mark 404 as retryable, but the reconnect/recovery continuation layer (schedule_pending_remote_retry_with_limit in tui_lifecycle.rs) still gives deterministic 4xx model/endpoint errors a short auto-poke retry. We should short-circuit non-retryable 4xx model-capability errors (e.g. 404 UnsupportedModel, model-not-found) so they fail fast with an actionable hint instead of retrying.

    Status

    • Reproducible with a clear fix path.
    • Priority: medium (no data loss; affects users on Ark's coding endpoint with an incompatible model).

    Labeling accordingly.

  2. added
    bug
    triage: reproducible
    priority: medium
    autonomous: clear
    on Jun 18, 2026
  3. 1jehuang commented on Jun 28, 2026

    @1jehuang
    Owner

    Triaged: jcode does not implement any "coding plan feature" in its request path, and the recovery/reconnect continuation just sends a normal chat message (no special params). The 404 UnsupportedModel comes from the configured Volcengine Ark coding endpoint (/api/coding/v3/chat/completions) rejecting ark-code-latest for that endpoint's coding-plan mode, per Volcengine's own docs. This reproduces only against the live Ark endpoint and is not autonomously fixable/verifiable in-tree. Keeping open as needs-info: please confirm whether a normal (non-recovery) turn to the same model+endpoint succeeds, which would isolate it to the recovery path vs. the endpoint/model pairing.

  4. 1jehuang commented on Jun 29, 2026

    @1jehuang
    Owner

    Fix in #417: added is_fatal_model_endpoint_error and short-circuited deterministic model/endpoint-capability errors (e.g. Ark coding-plan 404 UnsupportedModel, model-not-found) in the remote error handler. The reconnect/recovery continuation now fails fast with an actionable model/base-URL hint instead of burning the auto-retry budget. (The 404 itself still originates server-side from the configured coding endpoint; this only fixes jcode's noisy retry behavior.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    autonomous: clearbugpriority: mediumtriage: reproducible

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions