Skip to content

fix(kiro): always attach profileArn to chat requests#20

Merged
mydisha merged 1 commit into
mainfrom
fix/claude-code-kiro-provider
Jun 20, 2026
Merged

fix(kiro): always attach profileArn to chat requests#20
mydisha merged 1 commit into
mainfrom
fix/claude-code-kiro-provider

Conversation

@mydisha

@mydisha mydisha commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Summary

Upstream now rejects generateAssistantResponse without profileArn (400 "profileArn is required for this request."). This change ensures a profileArn is always attached to Kiro chat requests.

Changes

  • Add kiroResolveProfileArn:
    • API-key auth sends only the key-resolved ARN (a foreign ARN 403s).
    • OAuth/social prefers the resolved ARN, falling back to a shared default keyed by auth method.
  • Add kiroDefaultProfileArn mapping social sign-ins (google/github/imported/social) to the social profile, and others to the builder-id profile.
  • Use the resolver in Stream; replace the hardcoded ARN in FetchQuota.

Tests

  • Add TestKiroResolveProfileArn covering OAuth fallback, API-key, and resolved-ARN cases.

Upstream now rejects generateAssistantResponse without profileArn (400 "profileArn is required for this request.").

Add kiroResolveProfileArn: API-key auth sends only key-resolved ARN (foreign ARN 403s); OAuth/social prefers resolved ARN, falls back to shared default keyed by auth method. Add kiroDefaultProfileArn mapping social sign-ins (google/github/imported/social) to social profile, others to builder-id profile.

Use resolver in Stream; replace hardcoded ARN in FetchQuota. Add TestKiroResolveProfileArn covering OAuth fallback, API-key, and resolved-ARN cases.
@mydisha mydisha merged commit e0d8976 into main Jun 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant