fix(provider): harden runtime catalog boundaries - #3243
Merged
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 963bee1ba0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
kojiwakayama
force-pushed
the
codex/agent-hosted-runtime-hardening-20260802
branch
from
August 2, 2026 12:51
18820d2 to
9027136
Compare
kojiwakayama
force-pushed
the
codex/provider-runtime-catalog-hardening-20260802
branch
from
August 2, 2026 12:52
193a2b6 to
588e9dd
Compare
The runtime catalog rewrite dropped the `local` shared registration while converting the guarded `if (!manager.has(...))` blocks into unconditional ones, so every `local/...` model string failed to resolve. Nothing replaced it: `resolveRuntimeModel()` still passes `local/` through untouched, and `createLocalModel()` already exposes the generic `prepare()` hook that `ensureModelReady()` was refactored to call. Re-register `local` alongside the other shared providers and cover credential-free resolution so the regression cannot return.
`stringifyJsonValue()` lost its string pass-through, so plain-string tool results were JSON.stringify'd into quote-wrapped text before reaching OpenAI-compatible messages, Anthropic tool_result blocks, and OpenAI Responses output. Restore the pass-through ahead of the undefined-serialization guard the rewrite added, keeping both behaviours.
Enabling the OpenAI provider-native web_search left three tests asserting the previous behaviour, where `openai` exposed no provider-native tools at all. They failed because `web_search` now correctly reaches the runtime inventory and the fork availability list. The unit tests next to the change were updated with it, and its own new "returns no provider-native tool names for unsupported providers" case moved the unsupported example to google. These three were missed. Keep each assertion's original intent by pointing it at a combination that is still genuinely unsupported: OpenAI exposes a native web_search but no native web_fetch, so the inventory tests now require the supported half to be advertised and the unsupported half to be dropped. That is a stronger check than the previous one, which only proved a provider with zero native tools contributes nothing.
…hardening-20260802' into codex/agent-hosted-runtime-rebased-20260802
…ning-20260802' into codex/provider-runtime-catalog-rebased-20260802
…ardening-20260802' into codex/provider-runtime-catalog-rebased-20260802
Base automatically changed from
codex/agent-hosted-runtime-hardening-20260802
to
codex/provider-anthropic-google-hardening-20260802
August 2, 2026 14:08
kwakayama
merged commit Aug 2, 2026
303fcfa
into
codex/provider-anthropic-google-hardening-20260802
1 check passed
kojiwakayama
added a commit
that referenced
this pull request
Aug 2, 2026
* fix(agent): harden hosted runtime contracts * fix(provider): harden runtime catalog contracts * fix(provider): restore the built-in local model provider The runtime catalog rewrite dropped the `local` shared registration while converting the guarded `if (!manager.has(...))` blocks into unconditional ones, so every `local/...` model string failed to resolve. Nothing replaced it: `resolveRuntimeModel()` still passes `local/` through untouched, and `createLocalModel()` already exposes the generic `prepare()` hook that `ensureModelReady()` was refactored to call. Re-register `local` alongside the other shared providers and cover credential-free resolution so the regression cannot return. * fix(provider): stop double-encoding string tool values `stringifyJsonValue()` lost its string pass-through, so plain-string tool results were JSON.stringify'd into quote-wrapped text before reaching OpenAI-compatible messages, Anthropic tool_result blocks, and OpenAI Responses output. Restore the pass-through ahead of the undefined-serialization guard the rewrite added, keeping both behaviours. * test(agent): align inventory expectations with OpenAI native search Enabling the OpenAI provider-native web_search left three tests asserting the previous behaviour, where `openai` exposed no provider-native tools at all. They failed because `web_search` now correctly reaches the runtime inventory and the fork availability list. The unit tests next to the change were updated with it, and its own new "returns no provider-native tool names for unsupported providers" case moved the unsupported example to google. These three were missed. Keep each assertion's original intent by pointing it at a combination that is still genuinely unsupported: OpenAI exposes a native web_search but no native web_fetch, so the inventory tests now require the supported half to be advertised and the unsupported half to be dropped. That is a stronger check than the previous one, which only proved a provider with zero native tools contributes nothing.
kojiwakayama
added a commit
that referenced
this pull request
Aug 2, 2026
* fix(agent): harden hosted runtime contracts * fix(provider): harden runtime catalog contracts * fix(provider): restore the built-in local model provider The runtime catalog rewrite dropped the `local` shared registration while converting the guarded `if (!manager.has(...))` blocks into unconditional ones, so every `local/...` model string failed to resolve. Nothing replaced it: `resolveRuntimeModel()` still passes `local/` through untouched, and `createLocalModel()` already exposes the generic `prepare()` hook that `ensureModelReady()` was refactored to call. Re-register `local` alongside the other shared providers and cover credential-free resolution so the regression cannot return. * fix(provider): stop double-encoding string tool values `stringifyJsonValue()` lost its string pass-through, so plain-string tool results were JSON.stringify'd into quote-wrapped text before reaching OpenAI-compatible messages, Anthropic tool_result blocks, and OpenAI Responses output. Restore the pass-through ahead of the undefined-serialization guard the rewrite added, keeping both behaviours. * test(agent): align inventory expectations with OpenAI native search Enabling the OpenAI provider-native web_search left three tests asserting the previous behaviour, where `openai` exposed no provider-native tools at all. They failed because `web_search` now correctly reaches the runtime inventory and the fork availability list. The unit tests next to the change were updated with it, and its own new "returns no provider-native tool names for unsupported providers" case moved the unsupported example to google. These three were missed. Keep each assertion's original intent by pointing it at a combination that is still genuinely unsupported: OpenAI exposes a native web_search but no native web_fetch, so the inventory tests now require the supported half to be advertised and the unsupported half to be dropped. That is a stronger check than the previous one, which only proved a provider with zero native tools contributes nothing.
kojiwakayama
added a commit
that referenced
this pull request
Aug 2, 2026
* fix(agent): harden hosted runtime contracts * fix(provider): harden runtime catalog contracts * fix(provider): restore the built-in local model provider The runtime catalog rewrite dropped the `local` shared registration while converting the guarded `if (!manager.has(...))` blocks into unconditional ones, so every `local/...` model string failed to resolve. Nothing replaced it: `resolveRuntimeModel()` still passes `local/` through untouched, and `createLocalModel()` already exposes the generic `prepare()` hook that `ensureModelReady()` was refactored to call. Re-register `local` alongside the other shared providers and cover credential-free resolution so the regression cannot return. * fix(provider): stop double-encoding string tool values `stringifyJsonValue()` lost its string pass-through, so plain-string tool results were JSON.stringify'd into quote-wrapped text before reaching OpenAI-compatible messages, Anthropic tool_result blocks, and OpenAI Responses output. Restore the pass-through ahead of the undefined-serialization guard the rewrite added, keeping both behaviours. * test(agent): align inventory expectations with OpenAI native search Enabling the OpenAI provider-native web_search left three tests asserting the previous behaviour, where `openai` exposed no provider-native tools at all. They failed because `web_search` now correctly reaches the runtime inventory and the fork availability list. The unit tests next to the change were updated with it, and its own new "returns no provider-native tool names for unsupported providers" case moved the unsupported example to google. These three were missed. Keep each assertion's original intent by pointing it at a combination that is still genuinely unsupported: OpenAI exposes a native web_search but no native web_fetch, so the inventory tests now require the supported half to be advertised and the unsupported half to be dropped. That is a stronger check than the previous one, which only proved a provider with zero native tools contributes nothing.
kojiwakayama
added a commit
that referenced
this pull request
Aug 2, 2026
* fix(agent): harden hosted runtime contracts * fix(provider): harden runtime catalog contracts * fix(provider): restore the built-in local model provider The runtime catalog rewrite dropped the `local` shared registration while converting the guarded `if (!manager.has(...))` blocks into unconditional ones, so every `local/...` model string failed to resolve. Nothing replaced it: `resolveRuntimeModel()` still passes `local/` through untouched, and `createLocalModel()` already exposes the generic `prepare()` hook that `ensureModelReady()` was refactored to call. Re-register `local` alongside the other shared providers and cover credential-free resolution so the regression cannot return. * fix(provider): stop double-encoding string tool values `stringifyJsonValue()` lost its string pass-through, so plain-string tool results were JSON.stringify'd into quote-wrapped text before reaching OpenAI-compatible messages, Anthropic tool_result blocks, and OpenAI Responses output. Restore the pass-through ahead of the undefined-serialization guard the rewrite added, keeping both behaviours. * test(agent): align inventory expectations with OpenAI native search Enabling the OpenAI provider-native web_search left three tests asserting the previous behaviour, where `openai` exposed no provider-native tools at all. They failed because `web_search` now correctly reaches the runtime inventory and the fork availability list. The unit tests next to the change were updated with it, and its own new "returns no provider-native tool names for unsupported providers" case moved the unsupported example to google. These three were missed. Keep each assertion's original intent by pointing it at a combination that is still genuinely unsupported: OpenAI exposes a native web_search but no native web_fetch, so the inventory tests now require the supported half to be advertised and the unsupported half to be dropped. That is a stronger check than the previous one, which only proved a provider with zero native tools contributes nothing.
kojiwakayama
added a commit
that referenced
this pull request
Aug 2, 2026
* fix(agent): harden hosted runtime contracts * fix(provider): harden runtime catalog contracts * fix(provider): restore the built-in local model provider The runtime catalog rewrite dropped the `local` shared registration while converting the guarded `if (!manager.has(...))` blocks into unconditional ones, so every `local/...` model string failed to resolve. Nothing replaced it: `resolveRuntimeModel()` still passes `local/` through untouched, and `createLocalModel()` already exposes the generic `prepare()` hook that `ensureModelReady()` was refactored to call. Re-register `local` alongside the other shared providers and cover credential-free resolution so the regression cannot return. * fix(provider): stop double-encoding string tool values `stringifyJsonValue()` lost its string pass-through, so plain-string tool results were JSON.stringify'd into quote-wrapped text before reaching OpenAI-compatible messages, Anthropic tool_result blocks, and OpenAI Responses output. Restore the pass-through ahead of the undefined-serialization guard the rewrite added, keeping both behaviours. * test(agent): align inventory expectations with OpenAI native search Enabling the OpenAI provider-native web_search left three tests asserting the previous behaviour, where `openai` exposed no provider-native tools at all. They failed because `web_search` now correctly reaches the runtime inventory and the fork availability list. The unit tests next to the change were updated with it, and its own new "returns no provider-native tool names for unsupported providers" case moved the unsupported example to google. These three were missed. Keep each assertion's original intent by pointing it at a combination that is still genuinely unsupported: OpenAI exposes a native web_search but no native web_fetch, so the inventory tests now require the supported half to be advertised and the unsupported half to be dropped. That is a stronger check than the previous one, which only proved a provider with zero native tools contributes nothing.
kojiwakayama
added a commit
that referenced
this pull request
Aug 2, 2026
* fix(agent): harden hosted runtime contracts * fix(provider): harden runtime catalog contracts * fix(provider): restore the built-in local model provider The runtime catalog rewrite dropped the `local` shared registration while converting the guarded `if (!manager.has(...))` blocks into unconditional ones, so every `local/...` model string failed to resolve. Nothing replaced it: `resolveRuntimeModel()` still passes `local/` through untouched, and `createLocalModel()` already exposes the generic `prepare()` hook that `ensureModelReady()` was refactored to call. Re-register `local` alongside the other shared providers and cover credential-free resolution so the regression cannot return. * fix(provider): stop double-encoding string tool values `stringifyJsonValue()` lost its string pass-through, so plain-string tool results were JSON.stringify'd into quote-wrapped text before reaching OpenAI-compatible messages, Anthropic tool_result blocks, and OpenAI Responses output. Restore the pass-through ahead of the undefined-serialization guard the rewrite added, keeping both behaviours. * test(agent): align inventory expectations with OpenAI native search Enabling the OpenAI provider-native web_search left three tests asserting the previous behaviour, where `openai` exposed no provider-native tools at all. They failed because `web_search` now correctly reaches the runtime inventory and the fork availability list. The unit tests next to the change were updated with it, and its own new "returns no provider-native tool names for unsupported providers" case moved the unsupported example to google. These three were missed. Keep each assertion's original intent by pointing it at a combination that is still genuinely unsupported: OpenAI exposes a native web_search but no native web_fetch, so the inventory tests now require the supported half to be advertised and the unsupported half to be dropped. That is a stronger check than the previous one, which only proved a provider with zero native tools contributes nothing.
kojiwakayama
added a commit
that referenced
this pull request
Aug 2, 2026
* fix(agent): harden hosted runtime contracts * fix(provider): harden runtime catalog contracts * fix(provider): restore the built-in local model provider The runtime catalog rewrite dropped the `local` shared registration while converting the guarded `if (!manager.has(...))` blocks into unconditional ones, so every `local/...` model string failed to resolve. Nothing replaced it: `resolveRuntimeModel()` still passes `local/` through untouched, and `createLocalModel()` already exposes the generic `prepare()` hook that `ensureModelReady()` was refactored to call. Re-register `local` alongside the other shared providers and cover credential-free resolution so the regression cannot return. * fix(provider): stop double-encoding string tool values `stringifyJsonValue()` lost its string pass-through, so plain-string tool results were JSON.stringify'd into quote-wrapped text before reaching OpenAI-compatible messages, Anthropic tool_result blocks, and OpenAI Responses output. Restore the pass-through ahead of the undefined-serialization guard the rewrite added, keeping both behaviours. * test(agent): align inventory expectations with OpenAI native search Enabling the OpenAI provider-native web_search left three tests asserting the previous behaviour, where `openai` exposed no provider-native tools at all. They failed because `web_search` now correctly reaches the runtime inventory and the fork availability list. The unit tests next to the change were updated with it, and its own new "returns no provider-native tool names for unsupported providers" case moved the unsupported example to google. These three were missed. Keep each assertion's original intent by pointing it at a combination that is still genuinely unsupported: OpenAI exposes a native web_search but no native web_fetch, so the inventory tests now require the supported half to be advertised and the unsupported half to be dropped. That is a stronger check than the previous one, which only proved a provider with zero native tools contributes nothing.
kojiwakayama
added a commit
that referenced
this pull request
Aug 2, 2026
* fix(agent): harden hosted runtime contracts * fix(provider): harden runtime catalog contracts * fix(provider): restore the built-in local model provider The runtime catalog rewrite dropped the `local` shared registration while converting the guarded `if (!manager.has(...))` blocks into unconditional ones, so every `local/...` model string failed to resolve. Nothing replaced it: `resolveRuntimeModel()` still passes `local/` through untouched, and `createLocalModel()` already exposes the generic `prepare()` hook that `ensureModelReady()` was refactored to call. Re-register `local` alongside the other shared providers and cover credential-free resolution so the regression cannot return. * fix(provider): stop double-encoding string tool values `stringifyJsonValue()` lost its string pass-through, so plain-string tool results were JSON.stringify'd into quote-wrapped text before reaching OpenAI-compatible messages, Anthropic tool_result blocks, and OpenAI Responses output. Restore the pass-through ahead of the undefined-serialization guard the rewrite added, keeping both behaviours. * test(agent): align inventory expectations with OpenAI native search Enabling the OpenAI provider-native web_search left three tests asserting the previous behaviour, where `openai` exposed no provider-native tools at all. They failed because `web_search` now correctly reaches the runtime inventory and the fork availability list. The unit tests next to the change were updated with it, and its own new "returns no provider-native tool names for unsupported providers" case moved the unsupported example to google. These three were missed. Keep each assertion's original intent by pointing it at a combination that is still genuinely unsupported: OpenAI exposes a native web_search but no native web_fetch, so the inventory tests now require the supported half to be advertised and the unsupported half to be dropped. That is a stronger check than the previous one, which only proved a provider with zero native tools contributes nothing.
kojiwakayama
added a commit
that referenced
this pull request
Aug 2, 2026
* fix(agent): harden hosted runtime contracts * fix(provider): harden runtime catalog contracts * fix(provider): restore the built-in local model provider The runtime catalog rewrite dropped the `local` shared registration while converting the guarded `if (!manager.has(...))` blocks into unconditional ones, so every `local/...` model string failed to resolve. Nothing replaced it: `resolveRuntimeModel()` still passes `local/` through untouched, and `createLocalModel()` already exposes the generic `prepare()` hook that `ensureModelReady()` was refactored to call. Re-register `local` alongside the other shared providers and cover credential-free resolution so the regression cannot return. * fix(provider): stop double-encoding string tool values `stringifyJsonValue()` lost its string pass-through, so plain-string tool results were JSON.stringify'd into quote-wrapped text before reaching OpenAI-compatible messages, Anthropic tool_result blocks, and OpenAI Responses output. Restore the pass-through ahead of the undefined-serialization guard the rewrite added, keeping both behaviours. * test(agent): align inventory expectations with OpenAI native search Enabling the OpenAI provider-native web_search left three tests asserting the previous behaviour, where `openai` exposed no provider-native tools at all. They failed because `web_search` now correctly reaches the runtime inventory and the fork availability list. The unit tests next to the change were updated with it, and its own new "returns no provider-native tool names for unsupported providers" case moved the unsupported example to google. These three were missed. Keep each assertion's original intent by pointing it at a combination that is still genuinely unsupported: OpenAI exposes a native web_search but no native web_fetch, so the inventory tests now require the supported half to be advertised and the unsupported half to be dropped. That is a stronger check than the previous one, which only proved a provider with zero native tools contributes nothing.
kojiwakayama
added a commit
that referenced
this pull request
Aug 2, 2026
* fix(agent): harden hosted runtime contracts * fix(provider): harden runtime catalog contracts * fix(provider): restore the built-in local model provider The runtime catalog rewrite dropped the `local` shared registration while converting the guarded `if (!manager.has(...))` blocks into unconditional ones, so every `local/...` model string failed to resolve. Nothing replaced it: `resolveRuntimeModel()` still passes `local/` through untouched, and `createLocalModel()` already exposes the generic `prepare()` hook that `ensureModelReady()` was refactored to call. Re-register `local` alongside the other shared providers and cover credential-free resolution so the regression cannot return. * fix(provider): stop double-encoding string tool values `stringifyJsonValue()` lost its string pass-through, so plain-string tool results were JSON.stringify'd into quote-wrapped text before reaching OpenAI-compatible messages, Anthropic tool_result blocks, and OpenAI Responses output. Restore the pass-through ahead of the undefined-serialization guard the rewrite added, keeping both behaviours. * test(agent): align inventory expectations with OpenAI native search Enabling the OpenAI provider-native web_search left three tests asserting the previous behaviour, where `openai` exposed no provider-native tools at all. They failed because `web_search` now correctly reaches the runtime inventory and the fork availability list. The unit tests next to the change were updated with it, and its own new "returns no provider-native tool names for unsupported providers" case moved the unsupported example to google. These three were missed. Keep each assertion's original intent by pointing it at a combination that is still genuinely unsupported: OpenAI exposes a native web_search but no native web_fetch, so the inventory tests now require the supported half to be advertised and the unsupported half to be dropped. That is a stronger check than the previous one, which only proved a provider with zero native tools contributes nothing.
kojiwakayama
added a commit
that referenced
this pull request
Aug 2, 2026
* fix(agent): harden hosted runtime contracts * fix(provider): harden runtime catalog contracts * fix(provider): restore the built-in local model provider The runtime catalog rewrite dropped the `local` shared registration while converting the guarded `if (!manager.has(...))` blocks into unconditional ones, so every `local/...` model string failed to resolve. Nothing replaced it: `resolveRuntimeModel()` still passes `local/` through untouched, and `createLocalModel()` already exposes the generic `prepare()` hook that `ensureModelReady()` was refactored to call. Re-register `local` alongside the other shared providers and cover credential-free resolution so the regression cannot return. * fix(provider): stop double-encoding string tool values `stringifyJsonValue()` lost its string pass-through, so plain-string tool results were JSON.stringify'd into quote-wrapped text before reaching OpenAI-compatible messages, Anthropic tool_result blocks, and OpenAI Responses output. Restore the pass-through ahead of the undefined-serialization guard the rewrite added, keeping both behaviours. * test(agent): align inventory expectations with OpenAI native search Enabling the OpenAI provider-native web_search left three tests asserting the previous behaviour, where `openai` exposed no provider-native tools at all. They failed because `web_search` now correctly reaches the runtime inventory and the fork availability list. The unit tests next to the change were updated with it, and its own new "returns no provider-native tool names for unsupported providers" case moved the unsupported example to google. These three were missed. Keep each assertion's original intent by pointing it at a combination that is still genuinely unsupported: OpenAI exposes a native web_search but no native web_fetch, so the inventory tests now require the supported half to be advertised and the unsupported half to be dropped. That is a stronger check than the previous one, which only proved a provider with zero native tools contributes nothing.
kojiwakayama
added a commit
that referenced
this pull request
Aug 2, 2026
* fix(agent): harden hosted runtime contracts * fix(provider): harden runtime catalog contracts * fix(provider): restore the built-in local model provider The runtime catalog rewrite dropped the `local` shared registration while converting the guarded `if (!manager.has(...))` blocks into unconditional ones, so every `local/...` model string failed to resolve. Nothing replaced it: `resolveRuntimeModel()` still passes `local/` through untouched, and `createLocalModel()` already exposes the generic `prepare()` hook that `ensureModelReady()` was refactored to call. Re-register `local` alongside the other shared providers and cover credential-free resolution so the regression cannot return. * fix(provider): stop double-encoding string tool values `stringifyJsonValue()` lost its string pass-through, so plain-string tool results were JSON.stringify'd into quote-wrapped text before reaching OpenAI-compatible messages, Anthropic tool_result blocks, and OpenAI Responses output. Restore the pass-through ahead of the undefined-serialization guard the rewrite added, keeping both behaviours. * test(agent): align inventory expectations with OpenAI native search Enabling the OpenAI provider-native web_search left three tests asserting the previous behaviour, where `openai` exposed no provider-native tools at all. They failed because `web_search` now correctly reaches the runtime inventory and the fork availability list. The unit tests next to the change were updated with it, and its own new "returns no provider-native tool names for unsupported providers" case moved the unsupported example to google. These three were missed. Keep each assertion's original intent by pointing it at a combination that is still genuinely unsupported: OpenAI exposes a native web_search but no native web_fetch, so the inventory tests now require the supported half to be advertised and the unsupported half to be dropped. That is a stronger check than the previous one, which only proved a provider with zero native tools contributes nothing.
kojiwakayama
added a commit
that referenced
this pull request
Aug 2, 2026
* fix(agent): harden hosted runtime contracts * fix(provider): harden runtime catalog contracts * fix(provider): restore the built-in local model provider The runtime catalog rewrite dropped the `local` shared registration while converting the guarded `if (!manager.has(...))` blocks into unconditional ones, so every `local/...` model string failed to resolve. Nothing replaced it: `resolveRuntimeModel()` still passes `local/` through untouched, and `createLocalModel()` already exposes the generic `prepare()` hook that `ensureModelReady()` was refactored to call. Re-register `local` alongside the other shared providers and cover credential-free resolution so the regression cannot return. * fix(provider): stop double-encoding string tool values `stringifyJsonValue()` lost its string pass-through, so plain-string tool results were JSON.stringify'd into quote-wrapped text before reaching OpenAI-compatible messages, Anthropic tool_result blocks, and OpenAI Responses output. Restore the pass-through ahead of the undefined-serialization guard the rewrite added, keeping both behaviours. * test(agent): align inventory expectations with OpenAI native search Enabling the OpenAI provider-native web_search left three tests asserting the previous behaviour, where `openai` exposed no provider-native tools at all. They failed because `web_search` now correctly reaches the runtime inventory and the fork availability list. The unit tests next to the change were updated with it, and its own new "returns no provider-native tool names for unsupported providers" case moved the unsupported example to google. These three were missed. Keep each assertion's original intent by pointing it at a combination that is still genuinely unsupported: OpenAI exposes a native web_search but no native web_fetch, so the inventory tests now require the supported half to be advertised and the unsupported half to be dropped. That is a stronger check than the previous one, which only proved a provider with zero native tools contributes nothing.
kojiwakayama
added a commit
that referenced
this pull request
Aug 2, 2026
* fix(agent): harden hosted runtime contracts * fix(provider): harden runtime catalog contracts * fix(provider): restore the built-in local model provider The runtime catalog rewrite dropped the `local` shared registration while converting the guarded `if (!manager.has(...))` blocks into unconditional ones, so every `local/...` model string failed to resolve. Nothing replaced it: `resolveRuntimeModel()` still passes `local/` through untouched, and `createLocalModel()` already exposes the generic `prepare()` hook that `ensureModelReady()` was refactored to call. Re-register `local` alongside the other shared providers and cover credential-free resolution so the regression cannot return. * fix(provider): stop double-encoding string tool values `stringifyJsonValue()` lost its string pass-through, so plain-string tool results were JSON.stringify'd into quote-wrapped text before reaching OpenAI-compatible messages, Anthropic tool_result blocks, and OpenAI Responses output. Restore the pass-through ahead of the undefined-serialization guard the rewrite added, keeping both behaviours. * test(agent): align inventory expectations with OpenAI native search Enabling the OpenAI provider-native web_search left three tests asserting the previous behaviour, where `openai` exposed no provider-native tools at all. They failed because `web_search` now correctly reaches the runtime inventory and the fork availability list. The unit tests next to the change were updated with it, and its own new "returns no provider-native tool names for unsupported providers" case moved the unsupported example to google. These three were missed. Keep each assertion's original intent by pointing it at a combination that is still genuinely unsupported: OpenAI exposes a native web_search but no native web_fetch, so the inventory tests now require the supported half to be advertised and the unsupported half to be dropped. That is a stronger check than the previous one, which only proved a provider with zero native tools contributes nothing.
kojiwakayama
added a commit
that referenced
this pull request
Aug 2, 2026
* fix(agent): harden hosted runtime contracts * fix(provider): harden runtime catalog contracts * fix(provider): restore the built-in local model provider The runtime catalog rewrite dropped the `local` shared registration while converting the guarded `if (!manager.has(...))` blocks into unconditional ones, so every `local/...` model string failed to resolve. Nothing replaced it: `resolveRuntimeModel()` still passes `local/` through untouched, and `createLocalModel()` already exposes the generic `prepare()` hook that `ensureModelReady()` was refactored to call. Re-register `local` alongside the other shared providers and cover credential-free resolution so the regression cannot return. * fix(provider): stop double-encoding string tool values `stringifyJsonValue()` lost its string pass-through, so plain-string tool results were JSON.stringify'd into quote-wrapped text before reaching OpenAI-compatible messages, Anthropic tool_result blocks, and OpenAI Responses output. Restore the pass-through ahead of the undefined-serialization guard the rewrite added, keeping both behaviours. * test(agent): align inventory expectations with OpenAI native search Enabling the OpenAI provider-native web_search left three tests asserting the previous behaviour, where `openai` exposed no provider-native tools at all. They failed because `web_search` now correctly reaches the runtime inventory and the fork availability list. The unit tests next to the change were updated with it, and its own new "returns no provider-native tool names for unsupported providers" case moved the unsupported example to google. These three were missed. Keep each assertion's original intent by pointing it at a combination that is still genuinely unsupported: OpenAI exposes a native web_search but no native web_fetch, so the inventory tests now require the supported half to be advertised and the unsupported half to be dropped. That is a stronger check than the previous one, which only proved a provider with zero native tools contributes nothing.
kojiwakayama
added a commit
that referenced
this pull request
Aug 2, 2026
* fix(agent): harden hosted runtime contracts * fix(provider): harden runtime catalog contracts * fix(provider): restore the built-in local model provider The runtime catalog rewrite dropped the `local` shared registration while converting the guarded `if (!manager.has(...))` blocks into unconditional ones, so every `local/...` model string failed to resolve. Nothing replaced it: `resolveRuntimeModel()` still passes `local/` through untouched, and `createLocalModel()` already exposes the generic `prepare()` hook that `ensureModelReady()` was refactored to call. Re-register `local` alongside the other shared providers and cover credential-free resolution so the regression cannot return. * fix(provider): stop double-encoding string tool values `stringifyJsonValue()` lost its string pass-through, so plain-string tool results were JSON.stringify'd into quote-wrapped text before reaching OpenAI-compatible messages, Anthropic tool_result blocks, and OpenAI Responses output. Restore the pass-through ahead of the undefined-serialization guard the rewrite added, keeping both behaviours. * test(agent): align inventory expectations with OpenAI native search Enabling the OpenAI provider-native web_search left three tests asserting the previous behaviour, where `openai` exposed no provider-native tools at all. They failed because `web_search` now correctly reaches the runtime inventory and the fork availability list. The unit tests next to the change were updated with it, and its own new "returns no provider-native tool names for unsupported providers" case moved the unsupported example to google. These three were missed. Keep each assertion's original intent by pointing it at a combination that is still genuinely unsupported: OpenAI exposes a native web_search but no native web_fetch, so the inventory tests now require the supported half to be advertised and the unsupported half to be dropped. That is a stronger check than the previous one, which only proved a provider with zero native tools contributes nothing.
kojiwakayama
added a commit
that referenced
this pull request
Aug 2, 2026
* fix(agent): harden hosted runtime contracts * fix(provider): harden runtime catalog contracts * fix(provider): restore the built-in local model provider The runtime catalog rewrite dropped the `local` shared registration while converting the guarded `if (!manager.has(...))` blocks into unconditional ones, so every `local/...` model string failed to resolve. Nothing replaced it: `resolveRuntimeModel()` still passes `local/` through untouched, and `createLocalModel()` already exposes the generic `prepare()` hook that `ensureModelReady()` was refactored to call. Re-register `local` alongside the other shared providers and cover credential-free resolution so the regression cannot return. * fix(provider): stop double-encoding string tool values `stringifyJsonValue()` lost its string pass-through, so plain-string tool results were JSON.stringify'd into quote-wrapped text before reaching OpenAI-compatible messages, Anthropic tool_result blocks, and OpenAI Responses output. Restore the pass-through ahead of the undefined-serialization guard the rewrite added, keeping both behaviours. * test(agent): align inventory expectations with OpenAI native search Enabling the OpenAI provider-native web_search left three tests asserting the previous behaviour, where `openai` exposed no provider-native tools at all. They failed because `web_search` now correctly reaches the runtime inventory and the fork availability list. The unit tests next to the change were updated with it, and its own new "returns no provider-native tool names for unsupported providers" case moved the unsupported example to google. These three were missed. Keep each assertion's original intent by pointing it at a combination that is still genuinely unsupported: OpenAI exposes a native web_search but no native web_fetch, so the inventory tests now require the supported half to be advertised and the unsupported half to be dropped. That is a stronger check than the previous one, which only proved a provider with zero native tools contributes nothing.
kojiwakayama
added a commit
that referenced
this pull request
Aug 2, 2026
* fix(agent): harden hosted runtime contracts * fix(provider): harden runtime catalog contracts * fix(provider): restore the built-in local model provider The runtime catalog rewrite dropped the `local` shared registration while converting the guarded `if (!manager.has(...))` blocks into unconditional ones, so every `local/...` model string failed to resolve. Nothing replaced it: `resolveRuntimeModel()` still passes `local/` through untouched, and `createLocalModel()` already exposes the generic `prepare()` hook that `ensureModelReady()` was refactored to call. Re-register `local` alongside the other shared providers and cover credential-free resolution so the regression cannot return. * fix(provider): stop double-encoding string tool values `stringifyJsonValue()` lost its string pass-through, so plain-string tool results were JSON.stringify'd into quote-wrapped text before reaching OpenAI-compatible messages, Anthropic tool_result blocks, and OpenAI Responses output. Restore the pass-through ahead of the undefined-serialization guard the rewrite added, keeping both behaviours. * test(agent): align inventory expectations with OpenAI native search Enabling the OpenAI provider-native web_search left three tests asserting the previous behaviour, where `openai` exposed no provider-native tools at all. They failed because `web_search` now correctly reaches the runtime inventory and the fork availability list. The unit tests next to the change were updated with it, and its own new "returns no provider-native tool names for unsupported providers" case moved the unsupported example to google. These three were missed. Keep each assertion's original intent by pointing it at a combination that is still genuinely unsupported: OpenAI exposes a native web_search but no native web_fetch, so the inventory tests now require the supported half to be advertised and the unsupported half to be dropped. That is a stronger check than the previous one, which only proved a provider with zero native tools contributes nothing.
kojiwakayama
added a commit
that referenced
this pull request
Aug 3, 2026
* fix(agent): harden hosted runtime contracts * fix(provider): harden runtime catalog contracts * fix(provider): restore the built-in local model provider The runtime catalog rewrite dropped the `local` shared registration while converting the guarded `if (!manager.has(...))` blocks into unconditional ones, so every `local/...` model string failed to resolve. Nothing replaced it: `resolveRuntimeModel()` still passes `local/` through untouched, and `createLocalModel()` already exposes the generic `prepare()` hook that `ensureModelReady()` was refactored to call. Re-register `local` alongside the other shared providers and cover credential-free resolution so the regression cannot return. * fix(provider): stop double-encoding string tool values `stringifyJsonValue()` lost its string pass-through, so plain-string tool results were JSON.stringify'd into quote-wrapped text before reaching OpenAI-compatible messages, Anthropic tool_result blocks, and OpenAI Responses output. Restore the pass-through ahead of the undefined-serialization guard the rewrite added, keeping both behaviours. * test(agent): align inventory expectations with OpenAI native search Enabling the OpenAI provider-native web_search left three tests asserting the previous behaviour, where `openai` exposed no provider-native tools at all. They failed because `web_search` now correctly reaches the runtime inventory and the fork availability list. The unit tests next to the change were updated with it, and its own new "returns no provider-native tool names for unsupported providers" case moved the unsupported example to google. These three were missed. Keep each assertion's original intent by pointing it at a combination that is still genuinely unsupported: OpenAI exposes a native web_search but no native web_fetch, so the inventory tests now require the supported half to be advertised and the unsupported half to be dropped. That is a stronger check than the previous one, which only proved a provider with zero native tools contributes nothing.
kojiwakayama
added a commit
that referenced
this pull request
Aug 3, 2026
* fix(agent): harden hosted runtime contracts * fix(provider): harden runtime catalog contracts * fix(provider): restore the built-in local model provider The runtime catalog rewrite dropped the `local` shared registration while converting the guarded `if (!manager.has(...))` blocks into unconditional ones, so every `local/...` model string failed to resolve. Nothing replaced it: `resolveRuntimeModel()` still passes `local/` through untouched, and `createLocalModel()` already exposes the generic `prepare()` hook that `ensureModelReady()` was refactored to call. Re-register `local` alongside the other shared providers and cover credential-free resolution so the regression cannot return. * fix(provider): stop double-encoding string tool values `stringifyJsonValue()` lost its string pass-through, so plain-string tool results were JSON.stringify'd into quote-wrapped text before reaching OpenAI-compatible messages, Anthropic tool_result blocks, and OpenAI Responses output. Restore the pass-through ahead of the undefined-serialization guard the rewrite added, keeping both behaviours. * test(agent): align inventory expectations with OpenAI native search Enabling the OpenAI provider-native web_search left three tests asserting the previous behaviour, where `openai` exposed no provider-native tools at all. They failed because `web_search` now correctly reaches the runtime inventory and the fork availability list. The unit tests next to the change were updated with it, and its own new "returns no provider-native tool names for unsupported providers" case moved the unsupported example to google. These three were missed. Keep each assertion's original intent by pointing it at a combination that is still genuinely unsupported: OpenAI exposes a native web_search but no native web_fetch, so the inventory tests now require the supported half to be advertised and the unsupported half to be dropped. That is a stronger check than the previous one, which only proved a provider with zero native tools contributes nothing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is stacked on #3242 and contains only the remaining independent provider catalog/registry slice. Local Transformers extraction remains deferred to its extension/package track.
Validation
deno check src/provider/index.ts src/agent/index.tsdeno task typecheckgit diff --checkAll passed locally.