Claude Code custom endpoint fails on Palantir Language Model Service with `unrecognizedProperty=context_management`

Hi Palantir team,

I am documenting a reproducible compatibility issue between newer Claude Code versions and the Anthropic-compatible endpoint exposed through Palantir Language Model Service when using a custom setup instead of Palantir-hosted models.

The error returned by the endpoint is:

```text
API Error: 400
{“errorCode”:“INVALID_ARGUMENT”,“errorName”:“LanguageModelService:InvalidRequest”,“parameters”:{“unsafeParams”:“{unrecognizedProperty=context_management}”,“message”:“Request contained an unrecognized field”}}
```

## What we observed

- `palantir-mcp` itself can be configured and connected successfully.

  • The failure happens when Claude Code sends the actual LLM request.
  • Claude Code `2.1.87` fails against the Palantir Anthropic-compatible endpoint.
  • Claude Code `2.0.76` succeeds against the same endpoint and authentication setup.

This suggests the issue is not MCP connectivity itself, but request-schema compatibility at the Language Model Service layer.

## Probable cause

Newer Claude Code versions appear to send the Anthropic `context_management` field for context compaction / context editing.

The Palantir endpoint rejects that field as unknown:

- `unsafeParams: {unrecognizedProperty=context_management}`

That makes the custom endpoint incompatible with newer Claude Code clients even when auth and Foundry routing are otherwise correct.

## Why this matters

- It breaks local developer workflows using custom endpoint mode.

  • It forces teams to pin older Claude Code versions as a workaround.
  • It is easy to misdiagnose as an MCP integration issue.

## Request

Could the team clarify:

1. Whether `context_management` is intentionally unsupported today.
2. Whether unknown optional Anthropic request fields should be ignored for forward compatibility.
3. Whether there is an official compatibility matrix for Claude Code versions and Language Model Service.
4. Whether support for current Claude Code request schemas is planned.

## Temporary workaround

We are currently pinning Claude Code `2.0.76` for the affected repo because it works against the same custom endpoint, while `2.1.87` does not.

I can provide additional sanitized reproduction details if useful, but I am intentionally omitting any customer-specific tokens, enrollment identifiers, or private configuration values.

Thanks.