@gullabs/any-llm 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/any-llm/SKILL.md +26 -0
package/dist/index.cjs
CHANGED
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../package.json","../src/index.ts"],"names":[],"mappings":";;;;;;;;AAEE,IAAA,OAAA,GAAW,OAAA;;;ACcN,IAAM,eAAA,GAA0B","file":"index.cjs","sourcesContent":["{\n \"name\": \"@gullabs/any-llm\",\n \"version\": \"0.8.
|
|
1
|
+
{"version":3,"sources":["../package.json","../src/index.ts"],"names":[],"mappings":";;;;;;;;AAEE,IAAA,OAAA,GAAW,OAAA;;;ACcN,IAAM,eAAA,GAA0B","file":"index.cjs","sourcesContent":["{\n \"name\": \"@gullabs/any-llm\",\n \"version\": \"0.8.1\",\n \"description\": \"Batteries-included any-llm client for Gemini: engine, adapter, and Google SDK in one install.\",\n \"type\": \"module\",\n \"license\": \"Apache-2.0\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/gullabs/any-llm.git\",\n \"directory\": \"packages/any-llm\"\n },\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n }\n },\n \"files\": [\n \"dist\",\n \"skills\"\n ],\n \"scripts\": {\n \"build\": \"tsup\"\n },\n \"dependencies\": {\n \"@google/genai\": \"^1.45.0 || ^2\",\n \"@gullabs/core\": \"workspace:*\",\n \"@gullabs/google\": \"workspace:*\"\n },\n \"engines\": {\n \"node\": \">=20.9.0\"\n },\n \"sideEffects\": false,\n \"keywords\": [\n \"llm\",\n \"gemini\",\n \"google-genai\",\n \"ai\",\n \"tokens\",\n \"cost\",\n \"usage\",\n \"observability\",\n \"typescript\"\n ],\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"homepage\": \"https://github.com/gullabs/any-llm/tree/main/packages/any-llm#readme\",\n \"bugs\": \"https://github.com/gullabs/any-llm/issues\"\n}\n","/**\n * @gullabs/any-llm — batteries-included public entrypoint.\n *\n * This package is the default client install path. It re-exports the core\n * engine and Gemini adapter while depending on the Gemini SDK for a one-package\n * setup.\n *\n * @module\n */\n\nexport * from '@gullabs/core'\nexport * from '@gullabs/google'\n\nimport { version } from '../package.json'\n\n/** Library version, sourced from package.json at build time. */\nexport const ANY_LLM_VERSION: string = version\n"]}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../package.json","../src/index.ts"],"names":[],"mappings":";;;;;;AAEE,IAAA,OAAA,GAAW,OAAA;;;ACcN,IAAM,eAAA,GAA0B","file":"index.js","sourcesContent":["{\n \"name\": \"@gullabs/any-llm\",\n \"version\": \"0.8.
|
|
1
|
+
{"version":3,"sources":["../package.json","../src/index.ts"],"names":[],"mappings":";;;;;;AAEE,IAAA,OAAA,GAAW,OAAA;;;ACcN,IAAM,eAAA,GAA0B","file":"index.js","sourcesContent":["{\n \"name\": \"@gullabs/any-llm\",\n \"version\": \"0.8.1\",\n \"description\": \"Batteries-included any-llm client for Gemini: engine, adapter, and Google SDK in one install.\",\n \"type\": \"module\",\n \"license\": \"Apache-2.0\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/gullabs/any-llm.git\",\n \"directory\": \"packages/any-llm\"\n },\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n }\n },\n \"files\": [\n \"dist\",\n \"skills\"\n ],\n \"scripts\": {\n \"build\": \"tsup\"\n },\n \"dependencies\": {\n \"@google/genai\": \"^1.45.0 || ^2\",\n \"@gullabs/core\": \"workspace:*\",\n \"@gullabs/google\": \"workspace:*\"\n },\n \"engines\": {\n \"node\": \">=20.9.0\"\n },\n \"sideEffects\": false,\n \"keywords\": [\n \"llm\",\n \"gemini\",\n \"google-genai\",\n \"ai\",\n \"tokens\",\n \"cost\",\n \"usage\",\n \"observability\",\n \"typescript\"\n ],\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"homepage\": \"https://github.com/gullabs/any-llm/tree/main/packages/any-llm#readme\",\n \"bugs\": \"https://github.com/gullabs/any-llm/issues\"\n}\n","/**\n * @gullabs/any-llm — batteries-included public entrypoint.\n *\n * This package is the default client install path. It re-exports the core\n * engine and Gemini adapter while depending on the Gemini SDK for a one-package\n * setup.\n *\n * @module\n */\n\nexport * from '@gullabs/core'\nexport * from '@gullabs/google'\n\nimport { version } from '../package.json'\n\n/** Library version, sourced from package.json at build time. */\nexport const ANY_LLM_VERSION: string = version\n"]}
|
package/package.json
CHANGED
package/skills/any-llm/SKILL.md
CHANGED
|
@@ -163,6 +163,32 @@ const result = await client.generate(
|
|
|
163
163
|
`Grok45ConfigSchema`. Unlike Gemini, xai has no `serviceTier` concept and no `topK`;
|
|
164
164
|
its config schema is a single strict object with no tier branching.
|
|
165
165
|
|
|
166
|
+
## xAI structured-output schemas vs. OpenAI-strict / codex-cli schemas
|
|
167
|
+
|
|
168
|
+
As of the 2026-07-09 live probes, xAI's `strict: true` structured-output validation
|
|
169
|
+
on `text.format` json_schema performed no OpenAI-style compile-time schema checks —
|
|
170
|
+
schemas missing root/nested `additionalProperties: false`, properties omitted from
|
|
171
|
+
`required` (optional properties), `format`/other keywords, `anyOf`, `$defs`/`$ref`,
|
|
172
|
+
and nullable unions (`type: [T, 'null']`) were all accepted with HTTP 200.
|
|
173
|
+
`@gullabs/xai`'s adapter forwards schemas to xAI verbatim; no rewriting is applied.
|
|
174
|
+
|
|
175
|
+
`@gullabs/codex-cli`, by contrast, targets the codex CLI's own `--output-schema`
|
|
176
|
+
backend, which (verified 2026-07-09 via live probes against the real codex CLI
|
|
177
|
+
binary/backend) enforces exactly two structural rules: every object node must carry
|
|
178
|
+
`additionalProperties: false`, and `required` must be present and include every key
|
|
179
|
+
in `properties` (optional semantics are preserved by adding `null` to that
|
|
180
|
+
property's type, not by simply marking it required). `@gullabs/codex-cli` exports
|
|
181
|
+
`toOpenAiStrictOutputSchema` — an explicit opt-in transformer, never called
|
|
182
|
+
automatically by the adapter — that rewrites a schema to satisfy those two rules.
|
|
183
|
+
codex-cli's local preflight (`assertOpenAiStrictOutputSchema` in
|
|
184
|
+
`packages/codex-cli/src/adapter.ts`) enforces both rules locally before dispatch,
|
|
185
|
+
turning what used to be a live-round-trip provider 400 into an immediate local
|
|
186
|
+
`bad_request`.
|
|
187
|
+
|
|
188
|
+
This preflight/transformer pair is specific to codex-cli's own `--output-schema`
|
|
189
|
+
contract, not a general any-llm behavior — it is not applied to xai, which has no
|
|
190
|
+
such preflight (see the xAI Grok section above).
|
|
191
|
+
|
|
166
192
|
## Migrating raw `@google/genai` prompts
|
|
167
193
|
|
|
168
194
|
`geminiContentToMessages` (from `@gullabs/google`) converts hand-authored
|