Commit Graph

88 Commits

Author SHA1 Message Date
Peter Steinberger
39cc6b7dc7 fix: stabilize character eval and Qwen model routing 2026-04-09 01:04:09 +01:00
Ayaan Zaidi
99db33eb39 fix: keep runtime model lookup on configured workspace 2026-04-08 08:30:44 +05:30
ruclaw7
81969c7a91 fix: prefer codex gpt-5.4 runtime metadata (#62694) (thanks @ruclaw7)
* Agents: prefer runtime codex gpt-5.4 metadata

* Agents: move codex gpt-5.4 override into provider hook

* fix: repair codex runtime preference hooks

* fix: use workspace dir for codex runtime preference

* test: cover codex workspace dir hook

* fix: prefer codex gpt-5.4 runtime metadata (#62694) (thanks @ruclaw7)

---------

Co-authored-by: Rudi Cilibrasi <cilibrar@gmail.com>
Co-authored-by: Rudi Cilibrasi <rudi@metagood.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-08 08:16:23 +05:30
Tak Hoffman
97c031a8db feat: Add first-class infer CLI for inference workflows (#62129)
* refresh infer branch onto latest main

* flatten infer media commands

* fix tts runtime facade export

* validate explicit web search providers

* fix infer auth logout persistence
2026-04-07 07:11:19 -05:00
Peter Steinberger
fdc2f421e4 fix: restore pnpm check type safety 2026-04-06 01:04:34 +01:00
Peter Steinberger
94d3153817 test: split inline provider model coverage 2026-04-06 00:37:51 +01:00
Peter Steinberger
5ed02c1097 fix: restore foundry model input repair 2026-04-05 18:12:10 +01:00
Tak Hoffman
d28b02a7b1 fix: preserve Foundry image capability through runtime 2026-04-05 08:36:11 -05:00
Peter Steinberger
5ac07b8ef0 fix: normalize huggingface refs and discovery timeout 2026-04-05 09:18:17 +01:00
Peter Steinberger
58d2b9dd46 fix: add runtime model contextTokens caps 2026-04-04 09:36:53 +09:00
Peter Steinberger
93e716e775 test: trim model startup retry partial mocks 2026-04-03 21:10:17 +01:00
Vincent Koc
4798e125f4 feat(providers): add llm transport adapter seam (#60264)
* feat(providers): add llm transport adapter seam

* fix(providers): harden openai transport adapter

* fix(providers): correct transport usage accounting
2026-04-03 22:45:47 +09:00
Vincent Koc
61f13173c2 feat(providers): add model request transport overrides (#60200)
* feat(providers): add model request transport overrides

* chore(providers): finalize request override follow-ups

* fix(providers): narrow model request overrides
2026-04-03 19:00:06 +09:00
Vincent Koc
1707493be4 refactor(providers): add internal request config seam (#59454) 2026-04-02 14:28:25 +09:00
9ra55
5cf254a5f7 fix: honor authHeader provider config by injecting Authorization Bear… (#54390)
Merged via squash.

Prepared head SHA: 9889615571
Co-authored-by: lndyzwdxhs <16411017+lndyzwdxhs@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-04-01 13:18:37 -07:00
Kunal Karmakar
34b0a19a16 fix: use azure-openai-responses for Azure custom providers (#50851) (thanks @kunalk16)
* Add azure-openai-responses

* Unit tests update for updated API

* Add entry for PR #50851

* Add comma to address PR comment

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Address PR comment on sanitization of output

* Address review comment

* Revert commits

* Revert commit

* Update changelog stating Azure OpenAI only

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Add references

* Address PR comment on sanitization of output

* Address review comment

* Revert commits

* Revert commit

* Address PR comment on sanitization of output

* Address review comment

* Revert commits

* Revert commit

* Fix generated file

* Add azure openai responses to OPENAI_RESPONSES_APIS

* Add azure openai responses to createParallelToolCallsWrapper

* Adding azure openai responses to attempt.ts

* Add azure openai responses to google.ts

* Address PR comment on sanitization of output

* Revert commit

* Address PR comment on sanitization of output

* Revert commit

* Address PR comment on sanitization of output

* Revert commit

* Fix changelog

* Fix linting

* fix: cover azure responses wrapper path (#50851) (thanks @kunalk16)

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-30 16:17:03 +05:30
Vincent Koc
ace876b087 fix(gateway): keep startup model warmup static 2026-03-30 07:12:52 +09:00
Peter Steinberger
3f5ed11266 fix: clear stalled model resolution lanes 2026-03-30 05:09:26 +09:00
Peter Steinberger
edc58a6864 refactor: generalize provider transport hooks 2026-03-29 23:05:58 +09:00
Peter Steinberger
c664b67796 fix: apply Mistral compat across proxy transports 2026-03-29 16:32:31 +09:00
huntharo
0391e455bf Lint: drop stale model compat imports 2026-03-28 21:35:13 +00:00
huntharo
2765fdc2dd xAI: normalize stale Grok transport to Responses 2026-03-28 21:35:13 +00:00
Peter Steinberger
d9e7178534 fix(ci): align embedded runner and bedrock typing drift 2026-03-28 07:33:19 +00:00
Peter Steinberger
df204b1d8f fix: restore pi embedded runner transport typing 2026-03-28 06:18:35 +00:00
Peter Steinberger
d042192c7c refactor(plugins): move provider policy hooks into plugins 2026-03-28 06:11:13 +00:00
Peter Steinberger
c4e6fdf94d refactor(xai): move bundled xai runtime into plugin
Co-authored-by: Harold Hunt <harold@pwrdrvr.com>
2026-03-28 05:02:41 +00:00
Peter Steinberger
4ca07559ab refactor: move provider seams behind plugin sdk surfaces 2026-03-27 23:26:26 +00:00
Peter Steinberger
64bf80d4d5 refactor: move provider runtime into extensions 2026-03-27 05:38:58 +00:00
Tak Hoffman
6651511e90 fix: verify exact spawned session visibility 2026-03-24 20:39:00 -05:00
Vincent Koc
2069e124a9 chore(agents): normalize pi embedded runner imports 2026-03-24 18:06:24 -07:00
Peter Steinberger
f6205de73a refactor: split feishu helpers and tests 2026-03-24 17:12:25 -07:00
Peter Steinberger
5cdb50abe6 refactor: unify Google Generative AI normalization 2026-03-24 17:09:11 -07:00
Tak Hoffman
639706f298 fix: ignore moved child rows in subagent status 2026-03-24 18:57:42 -05:00
Aria
63b0036248 fix: normalize baseUrl for custom Google Generative AI providers
Custom providers using `api: "google-generative-ai"` (e.g. a paid
Google tier) resolved in the model picker but failed at runtime with
HTTP 404 because the base URL lacked the required `/v1beta` path
segment and provider normalization was gated on the provider key
being exactly `"google"`.

Two targeted fixes, both keyed on the semantic `api` field rather
than provider name strings:

1. `models-config.providers.ts` — change the normalization gate from
   `normalizedKey === "google"` to
   `normalizedProvider?.api === "google-generative-ai"` and add
   `normalizeGoogleBaseUrl()` to ensure the canonical `/v1beta` suffix.

2. `pi-embedded-runner/model.ts` — apply
   `normalizeGoogleGenerativeAiBaseUrl()` in three resolution paths
   (`applyConfiguredProviderOverrides`, `buildInlineProviderModels`,
   fallback model construction) so the base URL is corrected at
   runtime regardless of how the model was discovered.

No changes to name-only call sites (`model-selection`,
`live-model-filter`, `model-forward-compat`); those paths are not
required for custom provider resolution and broadening their provider
checks would incorrectly capture unrelated providers like
`google-antigravity`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 16:42:56 -07:00
Peter Steinberger
6a3d4f9fad test: isolate pi model and reset-model thread fixtures 2026-03-23 04:36:06 -07:00
Peter Steinberger
6e012d7feb test: inject model runtime hooks for thread-safe tests 2026-03-23 03:25:42 -07:00
Peter Steinberger
7ba28d6dba fix: repair runtime seams after rebase 2026-03-23 09:14:17 +00:00
Vincent Koc
f85cfc8b6c fix(gateway): harden first-turn startup readiness (#52387)
* fix(gateway): harden first-turn startup readiness

* fix(gateway): scope startup model retry
2026-03-22 12:12:08 -07:00
fuller-stack-dev
5137a51307 feat(github-copilot): resolve any model ID dynamically (#51325)
* feat(github-copilot): resolve any model ID dynamically instead of only known ones

* refactor(github-copilot): extract model resolution, add reasoning heuristic and tests

* fix(github-copilot): default synthetic models to text-only input

* ci: retrigger checks

* copilot: mark synthetic catch-all models as vision-capable

* fix(github-copilot): anchor reasoning regex, unexport internal constants, add mid-string test

* fix(github-copilot): default synthetic models to text-only input

* fix(github-copilot): restore image input for synthetic models with explanatory comment

* fix(github-copilot): normalize registry lookup casing, add bare o3 test case

* fix: preserve configured overrides for dynamic models

* fix: allow dynamic GitHub Copilot models (#51325) (thanks @fuller-stack-dev)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-21 17:37:50 +05:30
Peter Steinberger
a33caab280 refactor(plugins): move auth and model policy to providers 2026-03-15 20:59:06 -07:00
Peter Steinberger
b54e37c71f feat(plugins): merge openai vendor seams into one plugin 2026-03-15 18:20:52 -07:00
Peter Steinberger
ee7ecb2dd4 feat(plugins): move anthropic and openai vendors to plugins 2026-03-15 17:07:28 -07:00
Peter Steinberger
8e2a1d0941 feat(plugins): move bundled providers behind plugin hooks 2026-03-15 16:57:24 -07:00
Peter Steinberger
4a0f72866b feat(plugins): move provider runtimes into bundled plugins 2026-03-15 15:18:32 -07:00
Jinhao Dong
8e4a1d87e2 fix(openrouter): silently dropped images for new OpenRouter models — runtime capability detection (#45824)
* fix: fetch OpenRouter model capabilities at runtime for unknown models

When an OpenRouter model is not in the built-in static snapshot from
pi-ai, the fallback hardcodes input: ["text"], silently dropping images.

Query the OpenRouter API at runtime to detect actual capabilities
(image support, reasoning, context window) for models not in the
built-in list. Results are cached in memory for 1 hour. On API
failure/timeout, falls back to text-only (no regression).

* feat(openrouter): add disk cache for OpenRouter model capabilities

Persist the OpenRouter model catalog to ~/.openclaw/cache/openrouter-models.json
so it survives process restarts. Cache lookup order:

1. In-memory Map (instant)
2. On-disk JSON file (avoids network on restart)
3. OpenRouter API fetch (populates both layers)

Also triggers a background refresh when a model is not found in the cache,
in case it was newly added to OpenRouter.

* refactor(openrouter): remove pre-warm, use pure lazy-load with disk cache

- Remove eager ensureOpenRouterModelCache() from run.ts
- Remove TTL — model capabilities are stable, no periodic re-fetching
- Cache lookup: in-memory → disk → API fetch (only when needed)
- API is only called when no cache exists or a model is not found
- Disk cache persists across gateway restarts

* fix(openrouter): address review feedback

- Fix timer leak: move clearTimeout to finally block
- Fix modality check: only check input side of "->" separator to avoid
  matching image-generation models (text->image)
- Use resolveStateDir() instead of hardcoded homedir()/.openclaw
- Separate cache dir and filename constants
- Add utf-8 encoding to writeFileSync for consistency
- Add data validation when reading disk cache

* ci: retrigger checks

* fix: preload unknown OpenRouter model capabilities before resolve

* fix: accept top-level OpenRouter max token metadata

* fix: update changelog for OpenRouter runtime capability lookup (#45824) (thanks @DJjjjhao)

* fix: avoid redundant OpenRouter refetches and preserve suppression guards

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-15 11:48:39 +05:30
Peter Steinberger
d5b3f2ed71 fix(models): keep codex spark codex-only 2026-03-13 00:53:21 +00:00
Andyliu
10e6e27451 fix(models): guard optional model input capabilities (#42096)
Merged via squash.

Prepared head SHA: d398fa0222
Co-authored-by: andyliu <2377291+andyliu@users.noreply.github.com>
Co-authored-by: hydro13 <6640526+hydro13@users.noreply.github.com>
Reviewed-by: @hydro13
2026-03-11 13:43:59 +01:00
Josh Avant
36d2ae2a22 SecretRef: harden custom/provider secret persistence and reuse (#42554)
* Models: gate custom provider keys by usable secret semantics

* Config: project runtime writes onto source snapshot

* Models: prevent stale apiKey preservation for marker-managed providers

* Runner: strip SecretRef marker headers from resolved models

* Secrets: scan active agent models.json path in audit

* Config: guard runtime-source projection for unrelated configs

* Extensions: fix onboarding type errors in CI

* Tests: align setup helper account-enabled expectation

* Secrets audit: harden models.json file reads

* fix: harden SecretRef custom/provider secret persistence (#42554) (thanks @joshavant)
2026-03-10 23:55:10 +00:00
Peter Steinberger
24b53fcf47 refactor(agents): extract provider model normalization 2026-03-09 00:26:20 +00:00
0xsline
024857050a fix: normalize openai-codex gpt-5.4 transport overrides 2026-03-08 23:35:21 +00:00