[GH-ISSUE #523] TODO: port OpenRouter Azure-ignore default once provider profiles land in JS #267

Closed
opened 2026-06-05 17:21:22 -04:00 by yindo · 0 comments
Owner

Originally created by @open-swe[bot] on GitHub (May 5, 2026).
Original GitHub issue: https://github.com/langchain-ai/deepagentsjs/issues/523

Tracking: port the SDK-side Azure-upstream fix from deepagents (Python) to deepagentsjs once provider profiles exist in JS.

Background

In Python deepagents, the OpenRouter provider profile injects openrouter_provider={\"ignore\": [\"azure\"]} into init_chat_model calls by default. This avoids a known multi-turn breakage where OpenRouter routes reasoning-model traffic to Azure as the upstream, but its /responses beta is stateless — store=true / previous_response_id aren't propagated, so replayed rs_* reasoning items fail with \"Item with id 'rs_...' not found\".

Upstream PR: https://github.com/langchain-ai/deepagents/pull/3157

Why not now

deepagentsjs currently has no OpenRouter provider profile or _openrouter_attribution_kwargs equivalent — there are no provider profile factories at all on the JS side. There's nothing to hang the default kwarg off of yet.

When to do this

Once provider profiles are introduced in deepagentsjs (mirroring libs/deepagents/deepagents/profiles/provider/_openrouter.py), port:

  • Default injection of openrouter_provider: { ignore: [\"azure\"] } for OpenRouter-prefixed models.
  • Env-var escape hatch (Python uses DEEPAGENTS_OPENROUTER_ALLOW_AZURE) to opt back into Azure as a candidate provider.
  • Caller-supplied openrouter_provider must win over the SDK default.
  • Tests mirroring libs/deepagents/tests/unit_tests/test_models.py and libs/cli/tests/unit_tests/test_config.py from PR #3157.

Reference

  • Python implementation: libs/deepagents/deepagents/profiles/provider/_openrouter.py (after #3157)
  • Python tests: libs/deepagents/tests/unit_tests/test_models.py, libs/cli/tests/unit_tests/test_config.py
Originally created by @open-swe[bot] on GitHub (May 5, 2026). Original GitHub issue: https://github.com/langchain-ai/deepagentsjs/issues/523 Tracking: port the SDK-side Azure-upstream fix from `deepagents` (Python) to `deepagentsjs` once provider profiles exist in JS. ### Background In Python `deepagents`, the OpenRouter provider profile injects `openrouter_provider={\"ignore\": [\"azure\"]}` into `init_chat_model` calls by default. This avoids a known multi-turn breakage where OpenRouter routes reasoning-model traffic to Azure as the upstream, but its `/responses` beta is stateless — `store=true` / `previous_response_id` aren't propagated, so replayed `rs_*` reasoning items fail with `\"Item with id 'rs_...' not found\"`. Upstream PR: https://github.com/langchain-ai/deepagents/pull/3157 ### Why not now `deepagentsjs` currently has no OpenRouter provider profile or `_openrouter_attribution_kwargs` equivalent — there are no provider profile factories at all on the JS side. There's nothing to hang the default kwarg off of yet. ### When to do this Once provider profiles are introduced in `deepagentsjs` (mirroring `libs/deepagents/deepagents/profiles/provider/_openrouter.py`), port: - Default injection of `openrouter_provider: { ignore: [\"azure\"] }` for OpenRouter-prefixed models. - Env-var escape hatch (Python uses `DEEPAGENTS_OPENROUTER_ALLOW_AZURE`) to opt back into Azure as a candidate provider. - Caller-supplied `openrouter_provider` must win over the SDK default. - Tests mirroring `libs/deepagents/tests/unit_tests/test_models.py` and `libs/cli/tests/unit_tests/test_config.py` from PR #3157. ### Reference - Python implementation: `libs/deepagents/deepagents/profiles/provider/_openrouter.py` (after #3157) - Python tests: `libs/deepagents/tests/unit_tests/test_models.py`, `libs/cli/tests/unit_tests/test_config.py`
yindo closed this issue 2026-06-05 17:21:22 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/deepagentsjs#267