Skip to content

Warn (don't throw) on the client when a draft-protocol server omits required SEP-2549 ttlMs/cacheScope #1650

@tarekgh

Description

@tarekgh

Following up on PR #1623 (SEP-2549 caching hints), specifically the client-side handling discussed in #1623 (comment).

SEP-2549 makes ttlMs and cacheScope required on the cacheable results (tools/list, prompts/list, resources/list, resources/templates/list, resources/read) for servers that support the draft protocol version. Today the client tolerates their absence (TimeToLive/CacheScope are nullable and an absent cacheScope is treated as public), which is the right behavior for older or non-conformant servers.

We should additionally have the client emit a warning (not throw) when a server that advertises the new/draft protocol version omits these required fields, so non-conformance is observable without breaking anyone talking to such servers.

Scope:

  • Apply consistently across all five list/read response paths.
  • Log at warning level only; never throw on a missing field.
  • Only warn when the negotiated protocol version is the one that makes these fields required (don't warn when talking to older servers that legitimately omit them).

This is distinct from the other two follow-ups:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions