Push URL host knowledge from `Endpoint` (route layer) up to `model.baseURL`
(provider helper layer). The route just composes a path onto whatever
host the model already carries.
Endpoint:
- `Endpoint<Body>` shrinks to `{ path }`. No more `default`, `baseURL`,
or `required` fallback fields.
- `Endpoint.path(value)` replaces the old `Endpoint.baseURL({...})` factory.
- `Endpoint.render()` is now sync — `${model.baseURL}${path}` plus query
params. No fallback chain, no Effect wrapper.
ModelRef:
- `ModelRef.baseURL: Schema.String` (was optional). Every materialized
model carries a host.
- `RouteModelInput.baseURL?: string` stays optional so route defaults
can supply a canonical URL; routes without a default tighten it.
Provider helpers:
- Each protocol exports a `DEFAULT_BASE_URL` constant and bakes it into
`route.defaults.baseURL`. Provider helpers don't need to set baseURL.
- Azure uses a new `AtLeastOne<T>` helper from `auth-options.ts` to
require either `resourceName` or `baseURL` at the type level.
- Bedrock provider computes baseURL from `region` at construction time.
- OpenAI-compatible profiles now have required (not optional) `baseURL`
in their type — all 9 already supplied one.
- The `defaultBaseURL: string | false` knob on protocol endpoint
factories is gone.
Effects:
- Forgetting baseURL is now caught at compile time (TS) or model
construction time (modelWithDefaults runtime check), not request time.
- `Endpoint.render` no longer needs Effect wrapping in the transport
hot path.
Three small fixes for stale references after the recent
adapter→route rename and `model.protocol` field removal in
@opencode-ai/llm:
- Update three `@opencode-ai/llm/adapter` imports to `/route`.
- Switch `NATIVE_PROTOCOLS` filter on `model.protocol` to
`NATIVE_ROUTES` on `model.route`.
- Refresh test fixtures: `protocol:` → `route:`, drop `apiKey:`
/ `adapter:` assertions that reference fields no longer on
`ModelRef`, drop the `attachments` expectation that no longer
has a source-side handler.
- Default `key: "test-key"` on `ProviderTest.info` so prepare()
can resolve auth without per-test env setup.
Agents can now create temporary files in the global tmp directory without
triggering external_directory permission prompts. This enables agents to
freely use temporary storage for intermediate files during builds and
other operations.
Promotes queryParams to a first-class ModelRef field used by Endpoint.baseURL,
so deployment-level URL query params (Azure api-version, OpenAI-compatible
provider knobs) live in a typed home instead of an opaque `native` bag.
Also removes write-only dead fields from `native`:
- openaiCompatibleProvider (set by family helper, never read)
- opencodeProviderID, opencodeModelID (set by opencode bridge + native session
builder, never read)
- npm (set by opencode bridge, never read)
After this commit `model.native` only carries genuinely provider-specific
opaque options that no other adapter cares about (Bedrock's aws_credentials
+ aws_region for SigV4). Drops the now-dead ProviderShared.queryParams
helper. Updates AGENTS.md doc on native is implicit through the new schema
JSDoc.