[PR #74] [CLOSED] feat: request-driven thinking policy + anthropic compatibility improvements #75

Closed
opened 2026-02-27 07:17:51 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jwadow/kiro-gateway/pull/74
Author: @sametakofficial
Created: 2/9/2026
Status: Closed

Base: mainHead: feature/thinking-policy-migration


📝 Commits (6)

  • 56fdcde feat(thinking): add request-driven thinking policy and social-token auth routing
  • d73fbe3 docs: add feature-focused update summary and minimal env template
  • b3c78ec feat(thinking): align parser with request-level policy and document anthropic high/max
  • bac2e28 docs: move handoff context to root and add fork purpose section
  • fe67f8f feat(thinking): harden defaults and unify guard/retry handling
  • b41a8e9 docs: reorganize fork documentation under fork-docs

📊 Changes

49 files changed (+16458 additions, -6877 deletions)

View changed files

📝 .env.example (+144 -3)
📝 README.md (+21 -0)
fork-docs/ARCHITECTURE_AUDIT.md (+67 -0)
fork-docs/CHANGES_CONTEXT_FULL.md (+210 -0)
fork-docs/FORK_CHANGELOG.md (+192 -0)
fork-docs/HANDOFF_THINKING_POLICY_MIGRATION.md (+1138 -0)
fork-docs/KIRO_API_REVERSE_ENGINEERED.md (+206 -0)
fork-docs/PROMPT_KIRO_GATEWAY_DEEP_AUDIT_TR.md (+209 -0)
fork-docs/PR_REVIEW_SUMMARY.md (+52 -0)
fork-docs/SECURITY_REVIEW.md (+58 -0)
📝 kiro/auth.py (+340 -240)
📝 kiro/config.py (+307 -28)
📝 kiro/converters_anthropic.py (+15 -4)
📝 kiro/converters_core.py (+918 -373)
📝 kiro/converters_openai.py (+101 -75)
📝 kiro/http_client.py (+114 -83)
📝 kiro/kiro_errors.py (+21 -18)
kiro/middleware/__init__.py (+38 -0)
kiro/middleware/message_structure_validator.py (+188 -0)
kiro/middleware/payload_size_guard.py (+271 -0)

...and 29 more files

📄 Description

Summary

  • add request-driven thinking policy resolution with explicit precedence (body > headers > defaults) and wire it into OpenAI/Anthropic conversion paths
  • make default fallback behavior no-thinking unless explicitly enabled, while preserving explicit high/max thinking hints
  • improve auth compatibility for Anthropic-style clients (x-api-key, api-key, and bearer) and document fork behavior and env template updates
  • include social-token routing stability fix for kiro-cli sqlite mixed-token scenarios and configurable TLS trust toggle for proxy environments

Notes

  • branch is cleanly based on upstream main
  • .env is not tracked; only .env.example docs/template changed

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jwadow/kiro-gateway/pull/74 **Author:** [@sametakofficial](https://github.com/sametakofficial) **Created:** 2/9/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feature/thinking-policy-migration` --- ### 📝 Commits (6) - [`56fdcde`](https://github.com/jwadow/kiro-gateway/commit/56fdcdee6fb06906b9a2ddc92b6ddf0d40f463e9) feat(thinking): add request-driven thinking policy and social-token auth routing - [`d73fbe3`](https://github.com/jwadow/kiro-gateway/commit/d73fbe397fc8a10f6199f492a50fd8d05c0bd70f) docs: add feature-focused update summary and minimal env template - [`b3c78ec`](https://github.com/jwadow/kiro-gateway/commit/b3c78ecfe4b29672626ed548e4bc175995b229c7) feat(thinking): align parser with request-level policy and document anthropic high/max - [`bac2e28`](https://github.com/jwadow/kiro-gateway/commit/bac2e28cd2be7ae8d9a30e051a57d295aafd8d84) docs: move handoff context to root and add fork purpose section - [`fe67f8f`](https://github.com/jwadow/kiro-gateway/commit/fe67f8fa11a91a00e008044edf0a6cf1f2086423) feat(thinking): harden defaults and unify guard/retry handling - [`b41a8e9`](https://github.com/jwadow/kiro-gateway/commit/b41a8e9d63523cbd443fc588b0c230d213943038) docs: reorganize fork documentation under fork-docs ### 📊 Changes **49 files changed** (+16458 additions, -6877 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+144 -3) 📝 `README.md` (+21 -0) ➕ `fork-docs/ARCHITECTURE_AUDIT.md` (+67 -0) ➕ `fork-docs/CHANGES_CONTEXT_FULL.md` (+210 -0) ➕ `fork-docs/FORK_CHANGELOG.md` (+192 -0) ➕ `fork-docs/HANDOFF_THINKING_POLICY_MIGRATION.md` (+1138 -0) ➕ `fork-docs/KIRO_API_REVERSE_ENGINEERED.md` (+206 -0) ➕ `fork-docs/PROMPT_KIRO_GATEWAY_DEEP_AUDIT_TR.md` (+209 -0) ➕ `fork-docs/PR_REVIEW_SUMMARY.md` (+52 -0) ➕ `fork-docs/SECURITY_REVIEW.md` (+58 -0) 📝 `kiro/auth.py` (+340 -240) 📝 `kiro/config.py` (+307 -28) 📝 `kiro/converters_anthropic.py` (+15 -4) 📝 `kiro/converters_core.py` (+918 -373) 📝 `kiro/converters_openai.py` (+101 -75) 📝 `kiro/http_client.py` (+114 -83) 📝 `kiro/kiro_errors.py` (+21 -18) ➕ `kiro/middleware/__init__.py` (+38 -0) ➕ `kiro/middleware/message_structure_validator.py` (+188 -0) ➕ `kiro/middleware/payload_size_guard.py` (+271 -0) _...and 29 more files_ </details> ### 📄 Description ## Summary - add request-driven thinking policy resolution with explicit precedence (body > headers > defaults) and wire it into OpenAI/Anthropic conversion paths - make default fallback behavior no-thinking unless explicitly enabled, while preserving explicit high/max thinking hints - improve auth compatibility for Anthropic-style clients (x-api-key, api-key, and bearer) and document fork behavior and env template updates - include social-token routing stability fix for kiro-cli sqlite mixed-token scenarios and configurable TLS trust toggle for proxy environments ## Notes - branch is cleanly based on upstream main - .env is not tracked; only .env.example docs/template changed --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 07:17:51 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/kiro-gateway-jwadow#75
No description provided.