Skip to content

GitHub assigned-issues chat request fails when connected-service read result exceeds 16 KiB bounded projection limit #3405

Description

@jason-aelf

Summary

A /api/chat request asking the assistant to retrieve GitHub issues assigned to the authenticated user fails after invoking an authorized NyxID connected-service operation.

The visible failure is:

失败
Run authorized tool nyxop_3fb3e8e20165e59b027b43ac008a51c60e46ee3df415a969.
The connected-service read result exceeded the bounded projection limit. · NYXID_CONNECTED_SERVICE_READ_TOO_LARGE

This indicates the GitHub connected-service operation was authorized and executed far enough to enter the read-result projection path, but the result could not be exposed to the model because it exceeded the bounded connected-service read projection limit.

Request

Endpoint:

POST https://aevatar-console-backend-api.aevatar.ai/api/chat

Payload:

{
  "type": "text",
  "prompt": "retrieve issues that are assigned to me via my github account.",
  "clientRequestId": "client-text-5ae86635-04e9-4588-9ebc-7069e68962d2"
}

Actual Result

The chat run fails with:

失败
Run authorized tool nyxop_3fb3e8e20165e59b027b43ac008a51c60e46ee3df415a969.
The connected-service read result exceeded the bounded projection limit. · NYXID_CONNECTED_SERVICE_READ_TOO_LARGE

Observed Behavior

The failure occurs after an authorized nyxop_* tool is selected.

nyxop_* is a request-local opaque connected-service operation tool generated by Aevatar for an admitted NyxID operation. The message Run authorized tool ... means the request reached the authorized tool execution step rather than failing during initial chat request validation, GitHub connection discovery, or OAuth readiness checks.

Local Code Evidence

The connected-service read tool uses a fixed 16 KiB limit:

private const int MaxReadSourceBytes = 16 * 1024;
private const string ReadTooLargeErrorCode = "NYXID_CONNECTED_SERVICE_READ_TOO_LARGE";
private const string ReadTooLargeErrorMessage =
    "The connected-service read result exceeded the bounded projection limit.";

File:

src/Aevatar.AI.ToolProviders.NyxId/ConnectedServices/NyxIdConnectedServiceOperationTool.cs

The read path calls the NyxID proxy with the same 16 KiB bound for read-only admitted operations. The result is rejected when either:

  1. the upstream/source response exceeds the 16 KiB read limit; or
  2. the wrapped model-visible connected_service_read_projection exceeds the same 16 KiB limit.

Relevant logic:

var sourceBytes = Encoding.UTF8.GetByteCount(sourceResult ?? string.Empty);
if (sourceBytes > MaxReadSourceBytes ||
    string.Equals(
        sourceReceipt?.ErrorCode,
        ProxyResponseTooLargeErrorCode,
        StringComparison.Ordinal))
{
    return BuildReadTooLargeOutcome(callId, toolName);
}

...

var projection = BuildReadProjection("succeeded", data, null, null);
if (Encoding.UTF8.GetByteCount(projection) > MaxReadSourceBytes)
    return BuildReadTooLargeOutcome(callId, toolName);

The lower-level bounded proxy read also rejects oversized responses before returning them to the connected-service projection layer:

if (response.Content.Headers.ContentLength is { } contentLength &&
    contentLength > maxBytes)
{
    return new NyxIdProxyTextResponse(
        false,
        string.Empty,
        Detail: "content_length_exceeds_max_bytes",
        HttpStatus: (int)response.StatusCode);
}

var content = await ReadBoundedContentAsync(response.Content, maxBytes, ct);
if (content.Exceeded)
{
    return new NyxIdProxyTextResponse(
        false,
        string.Empty,
        Detail: "content_exceeds_max_bytes",
        HttpStatus: (int)response.StatusCode);
}

File:

src/Aevatar.AI.ToolProviders.NyxId/NyxIdApiClient.cs

The design document also states that connected-service read operations are exposed as bounded connected_service_read_projection results, and both the upstream text and the final model-visible projection are capped at 16 KiB.

File:

docs/canon/nyxid-connected-service-tools.md

Impact

A natural-language request to retrieve GitHub issues assigned to the authenticated user can fail when the GitHub response payload is large.

GitHub issue list responses commonly include many fields per issue, including body text, labels, users, assignees, milestone, repository data, and multiple API URLs. A default issue-list response can exceed 16 KiB even when the user only expects a concise issue summary.

When this happens, no partial issue data is exposed to the model. The chat result terminates with the bounded projection error.

Current Understanding

This is not currently evidenced as:

  • GitHub OAuth not connected
  • GitHub token missing
  • GitHub permission denied
  • /api/chat payload parse failure
  • missing or invalid nyxop_* tool identity
  • direct GitHub REST API error returned to the user

The observed error points to the Aevatar/NyxID connected-service read projection boundary after tool authorization.

Reproduction Input

Use the authenticated production chat endpoint with the payload below:

{
  "type": "text",
  "prompt": "retrieve issues that are assigned to me via my github account.",
  "clientRequestId": "client-text-5ae86635-04e9-4588-9ebc-7069e68962d2"
}

Evidence Needed From Prod Logs

The following would confirm the exact branch of the oversized-result path:

  • the admitted nyxop_* operation identity
  • the resolved GitHub endpoint/path/query
  • whether the lower-level proxy returned NYXID_PROXY_RESPONSE_TOO_LARGE
  • whether the source response was within 16 KiB but the final connected_service_read_projection exceeded 16 KiB
  • the backend log entries correlated with clientRequestId=client-text-5ae86635-04e9-4588-9ebc-7069e68962d2

Notes

Local Kubernetes prod log access was not available during the initial investigation; kubectl resolved to the default localhost context. The current analysis is based on the returned error text, local repository code, tests, and design documentation.

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions