Skip to content

Commit 9862d63

Browse files
docs(skills): an agent's model name and provider are optional (#37765)
<!-- claude-projects-attribution: {"github_login":"hotlong"} --> _Requested by **Jack** · [project thread](https://claude.ai/code/project/chan_01EF41AQooqveF2DGD8nqPzS?thread=cmsg_01EF41AQooqveF2DGD8nqPzSVqcTHLLFPjviMwGsR87vDC)_ epic:#5055#1 · hotlong · session_01Q4EjjPtiBXJZAqMqBPe3UD Fixes #37711 Clause-②: no Metadata-protocol: none ## What The `objectstack-ai` skill still taught that an agent names its model and that `provider` defaults to `openai`. Since #37697 (merge `3e87d7b6`) both are optional and `provider` has no default. This PR brings the published text and its eval in line. - `skills/objectstack-ai/SKILL.md`, Model Configuration: - `model` is an optional free-string name; absent means the host's default model for the environment. - `provider` is optional with no default (the deployment's choice, see #37712). The inline enum list is unchanged and still accurate: `openai | azure_openai | anthropic | local`. - The schema citation moves from the stale `agent.zod.ts:36-40` to `:37-45`, the `AIModelConfigSchema` key list on main. - `skills/objectstack-ai/evals/skills-tools-knowledge.json`, case 2: accepts an omitted `model` and states the provider has no default. Assertions unchanged. - One `@objectstack/skills` patch changeset. No tier or sentinel wording (phase 2, not in the framework). ## Premise (on `origin/main` `cbc353ed`) `packages/spec/src/ai/agent.zod.ts`: ```ts 37 provider: z.enum(['openai', 'azure_openai', 'anthropic', 'local']).optional(), 38 model: z.string().optional().describe( 39 'Model name (e.g. gpt-4, claude-3-opus). Optional: when absent, the agent runs on the ' 40 + 'host\'s default model for this environment, so an agent that only tunes sampling ' 41 + '(e.g. `temperature`) need not name a model.', 42 ), 43 temperature: z.number().min(0).max(2).default(0.7), 44 maxTokens: z.number().optional(), 45 topP: z.number().optional(), ``` ## Token budget `skills/objectstack-ai/SKILL.md` sat at zero headroom (ceiling 6801). The new words are paid for by tightening the same section (shorter intro sentence, shorter registry and `maxTokens` rows); no fact is removed. The file now measures 6801 / 6801. ## Local gates - `node scripts/check-skills-token-ratchet.mjs` exit 0 (61 authored files within ceilings) - `pnpm check:skill-identifier-liveness` exit 0 - `pnpm check:skill-frame-sync` exit 0 - `pnpm check:skill-compatibility` exit 0 - `pnpm check:skill-top-level-keys` exit 0 (14 self-test cases) - `pnpm check:skill-links` exit 0 (272 links, 22 self-test cases) - `pnpm --filter @objectstack/spec check:skill-docs` exit 0 - `pnpm --filter @objectstack/spec check:skill-refs` exit 0 (10 generated files in sync) - `pnpm --filter @objectstack/spec check:skill-served-sections` exit 0 (33 self-test cases) - `pnpm --filter @objectstack/spec check:skill-examples` NOT MEASURED, exit 3: `@objectstack/client-react` dist not built in this container (spec was built). The diff touches no marked example block. - eval JSON parses. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Q4EjjPtiBXJZAqMqBPe3UD --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 7f19190 commit 9862d63

3 files changed

Lines changed: 16 additions & 7 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): an agent's model name and provider are optional
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-ai/SKILL.md` (Model Configuration) now teaches that `model.model` is optional, and that an agent without one runs on the host's default model for the environment, and that `model.provider` is optional with no default (the deployment's choice) instead of defaulting to `openai`. The inline enum list is unchanged, and the schema citation now points at `packages/spec/src/ai/agent.zod.ts:37-45`. The `objectstack-ai` eval case on sampling settings accepts an omitted `model` and states the provider has no default. Published prose only: it teaches the optional `model` / `provider` already on main since #37697. The file sat at zero token headroom, so the words are paid for by tightening the same section; no fact is removed.

‎skills/objectstack-ai/SKILL.md‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -361,16 +361,15 @@ live, but listing-only: carried onto the tool, never sent to the model).
361361

362362
## Model Configuration
363363

364-
Sampling parameters live under an agent's `model` (`AIModelConfigSchema`) —
365-
there is **no top-level `temperature` / `maxTokens`** on an agent
366-
(`packages/spec/src/ai/agent.zod.ts:36-40`):
364+
Sampling lives under an agent's `model` (`AIModelConfigSchema`), **never a
365+
top-level `temperature` / `maxTokens`** (`packages/spec/src/ai/agent.zod.ts:37-45`):
367366

368367
| Key | Contract |
369368
|:--|:--|
370-
| `provider` | Inline enum `openai` \| `azure_openai` \| `anthropic` \| `local` (default `openai`). **Model-registry** entries (`ModelProviderSchema`) accept a wider set: also `google`, `cohere`, `huggingface`, `custom` |
371-
| `model` | Free string — the provider's own model name |
369+
| `provider` | Optional, no default (the deployment's choice): inline enum `openai` \| `azure_openai` \| `anthropic` \| `local`. Model-registry entries (`ModelProviderSchema`) add `google`, `cohere`, `huggingface`, `custom` |
370+
| `model` | Optional free-string model name; absent = the host's default model for the environment |
372371
| `temperature` | `min(0).max(2)`, default `0.7`. **Outside 0–2 is a parse error** |
373-
| `maxTokens` / `topP` | Optional numbers, unbounded by the schema |
372+
| `maxTokens` / `topP` | Optional, schema-unbounded numbers |
374373

375374
---
376375

‎skills/objectstack-ai/evals/skills-tools-knowledge.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
{
1515
"id": 2,
1616
"prompt": "Our copilot should use Anthropic with a low temperature (0.3) and cap responses at 2000 tokens. Where do these settings go in the metadata?",
17-
"expected_output": "Places sampling under the agent's `model` block (`AIModelConfigSchema`): `provider: 'anthropic'`, a free-string `model`, `temperature: 0.3` (0–2, outside is a parse error) and `maxTokens: 2000`. States that there is no top-level `temperature` / `maxTokens` on an agent and that the inline `provider` enum is `openai | azure_openai | anthropic | local`.",
17+
"expected_output": "Places sampling under the agent's `model` block (`AIModelConfigSchema`): `provider: 'anthropic'`, `temperature: 0.3` (0–2, outside is a parse error) and `maxTokens: 2000`; a free-string `model` is optional (absent runs on the host's default model), so omitting it is correct. States that there is no top-level `temperature` / `maxTokens` on an agent and that the inline `provider` enum is `openai | azure_openai | anthropic | local`, with no default.",
1818
"files": [],
1919
"assertions": {
2020
"must_contain": ["provider", "anthropic", "temperature", "maxTokens"],

0 commit comments

Comments
 (0)