anthropics / anthropics/financial-services

[BUG] Claude for Excel (Bedrock direct) selects us. inference profile when manifest aws_region is eu-west-1, causing 400/404 at bedrock-runtime.eu-west-1.amazonaws.com

Đang mở
#126 2 bình luận 3 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
34.8k
Fork
5.2k
Merge trung bình
2 giờ 2 phút
Pull request đã merge (30 ngày)
3

Mô tả

Origionally posted by @siddharthmishrasm under [Claude-code](https://github.com/anthropics/claude-code/issues/51074#issue-4294607829)

### What's Wrong?

When the `claude-in-office` manifest is provisioned with `aws_region: eu-west-1` for the Bedrock direct path, the add-in constructs invoke URLs of the form:

```
https://bedrock-runtime.eu-west-1.amazonaws.com/model/us.anthropic.claude-opus-4-7/invoke
```

This is an invalid combination. The `us.` cross-region inference profile only exists in and routes to `us-east-1`, `us-east-2`, and `us-west-2`. It is not resolvable from a `bedrock-runtime.eu-west-1.amazonaws.com` endpoint, so every request fails.

The root cause appears to be that the add-in's model selection logic is not region-aware: it picks a `us.`-prefixed inference profile regardless of the configured `aws_region`.

### Why admins cannot work around this

Per the [third-party platforms documentation](https://support.claude.com/en/articles/13945233-use-claude-for-excel-powerpoint-and-word-with-third-party-platforms) and the `claude-in-office` manifest spec, admins can configure `aws_region` but cannot pin a specific inference profile ID. The add-in discovers and selects the model at runtime. That means this bug cannot be worked around through manifest configuration — it requires a code fix.

### What Should Happen?

When `aws_region` is an EU region, the add-in should select a compatible profile:
- An `eu.`-prefixed geographic CRIS profile if one exists for the target model (e.g., `eu.anthropic.claude-opus-4-6-v1` for Opus 4.6), or
- A `global.`-prefixed profile (e.g., `global.anthropic.claude-opus-4-7`) when no `eu.` profile exists and the source region supports global CRIS (eu-west-1 does).

Symmetrically for `apac.` / APAC regions.

### Error Messages/Logs

```shell
Claude for Office connection failed (Bedrock)
Build: *****

400 The provided model identifier is invalid.

Request:
aws_role_arn: arn:aws:iam::*********:role/ClaudeBedrockAccess
aws_region: eu-west-1

Manifest params:
m: unified-1.0.0.12
aws_role_arn: arn:aws:iam::********:role/ClaudeBedrockAccess
aws_region: eu-west-1
entra_sso: 1
et:

Bootstrap response:
(not called)

Raw error:
400 The provided model identifier is invalid.
```

### Steps to Reproduce

1. Run `/claude-in-office:setup` and configure the Bedrock direct path with `aws_region: eu-west-1`.
2. Ensure the signed-in AWS role has access to `eu.` and/or `global.` inference profiles in eu-west-1 (verified working via AWS CLI `bedrock-runtime invoke-model`).
3. Deploy the manifest and open Claude for Excel.
4. Sign in via Entra ID.
5. Any prompt fails with an invocation error against `https://bedrock-runtime.eu-west-1.amazonaws.com/model/us.anthropic.claude-opus-4-7/invoke`.

### Expected Behavior

The add-in selects an inference profile whose source-region list includes the configured `aws_region`, and successfully invokes the model.

### Actual Behavior

The add-in selects `us.anthropic.claude-opus-4-7` (or similar `us.`-prefixed profile) and sends it to the eu-west-1 endpoint, resulting in a 400/404.

### Claude Model

Opus

### Is this a regression?

No, this never worked

### Last Working Version

_No response_

### Claude Code Version

2.1.113

### Platform

AWS Bedrock

### Operating System

macOS

### Terminal/Shell

Terminal.app (macOS)

### Additional Information

_No response_

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.