{"_id":"@ank1015/agents-provider-gemini-spec","_rev":"2-f2892b47a6357293e3fdbc43471b6f49","name":"@ank1015/agents-provider-gemini-spec","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@ank1015/agents-provider-gemini-spec","version":"0.1.0","keywords":["agents","gemini","google","llm","interactions","typescript"],"license":"UNLICENSED","_id":"@ank1015/agents-provider-gemini-spec@0.1.0","maintainers":[{"name":"ananya150","email":"ananyakhandelwal60@gmail.com"}],"homepage":"https://github.com/ank1015/agent#readme","bugs":{"url":"https://github.com/ank1015/agent/issues"},"dist":{"shasum":"8c61f0bc6fa007a55d7ee73d2305fb471368bcd5","tarball":"https://registry.npmjs.org/@ank1015/agents-provider-gemini-spec/-/agents-provider-gemini-spec-0.1.0.tgz","fileCount":15,"integrity":"sha512-bIoVNugeuHF6UWc+/lGAIaUFu9HFuEnnwOvNiWRWbijAz1tyHppGHw1hyXmQzLT8Ji7RzUgNYRzL9xzDmMLzSw==","signatures":[{"sig":"MEUCIDdiefPcY8sNw3YzJ27635lfZuMZMmG2enu8NYhggkB/AiEAskyTnpfOAHKlTOph67144uk7oUux0ygHO0b4iY7N5Qo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27403},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./config":{"types":"./dist/config.d.ts","import":"./dist/config.js"},"./models":{"types":"./dist/models.d.ts","import":"./dist/models.js"}},"gitHead":"431be335969ec0ba4d3eb5bd8127b8f9bc2f2005","scripts":{"test":"vitest run && tsc --noEmit --strict --skipLibCheck --module NodeNext --moduleResolution NodeNext --target ES2022 --ignoreConfig tests/*.test.ts","build":"tsc -b","check":"tsc -b --pretty false","clean":"rm -rf dist ../../.tsbuildinfo/provider-gemini-spec.tsbuildinfo","prepack":"tsc -b"},"_npmUser":{"name":"ananya150","email":"ananyakhandelwal60@gmail.com"},"repository":{"url":"git+https://github.com/ank1015/agent.git","type":"git","directory":"packages/provider-gemini-spec"},"_npmVersion":"11.17.0","description":"Gemini provider static spec (config + per-call option types) for @ank1015/agents.","directories":{},"sideEffects":false,"_nodeVersion":"26.4.0","dependencies":{"zod":"^4.4.3","@ank1015/agents-contracts":"^0.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.9"},"_npmOperationalInternal":{"tmp":"tmp/agents-provider-gemini-spec_0.1.0_1782740636141_0.7897751643373814","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@ank1015/agents-provider-gemini-spec","version":"0.1.1","description":"Gemini provider static spec (config + per-call option types) for @ank1015/agents.","keywords":["agents","gemini","google","llm","interactions","typescript"],"license":"UNLICENSED","type":"module","sideEffects":false,"main":"./dist/index.js","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/ank1015/agent.git","directory":"packages/provider-gemini-spec"},"bugs":{"url":"https://github.com/ank1015/agent/issues"},"homepage":"https://github.com/ank1015/agent#readme","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./config":{"types":"./dist/config.d.ts","import":"./dist/config.js"},"./models":{"types":"./dist/models.d.ts","import":"./dist/models.js"}},"publishConfig":{"access":"public"},"scripts":{"prepack":"tsc -b","build":"tsc -b","check":"tsc -b --pretty false","test":"vitest run && tsc --noEmit --strict --skipLibCheck --module NodeNext --moduleResolution NodeNext --target ES2022 --ignoreConfig tests/*.test.ts","clean":"rm -rf dist ../../.tsbuildinfo/provider-gemini-spec.tsbuildinfo"},"dependencies":{"@ank1015/agents-contracts":"^0.1.11","zod":"^4.4.3"},"devDependencies":{"vitest":"^4.1.9"},"gitHead":"621232a246d0d99569ea3cf02bdc37801c1c71df","_id":"@ank1015/agents-provider-gemini-spec@0.1.1","_nodeVersion":"26.4.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-k6tXCNoC3ZJUY1AgLaiokd1+ARoDfAIOslvvEVVZnuI3YTV61HMxlw/W6aZgb6mz15QoVfIJ7ljBCtDwh8Qz4w==","shasum":"f0014c7abd009bfa346c39de3c835413c4d6399e","tarball":"https://registry.npmjs.org/@ank1015/agents-provider-gemini-spec/-/agents-provider-gemini-spec-0.1.1.tgz","fileCount":15,"unpackedSize":27357,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDw4puE35P6odM6+d8VxeUEBWKJth/h4cS5xx7vzm4tWAiEA1R6IOcEmwU2bxzLo4yb8T8TNPqWC1IfJeJhBmdHEAA0="}]},"_npmUser":{"name":"ananya150","email":"ananyakhandelwal60@gmail.com"},"directories":{},"maintainers":[{"name":"ananya150","email":"ananyakhandelwal60@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agents-provider-gemini-spec_0.1.1_1783677155836_0.016572892457801913"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-29T13:43:55.985Z","modified":"2026-07-10T09:52:36.081Z","0.1.0":"2026-06-29T13:43:56.269Z","0.1.1":"2026-07-10T09:52:35.969Z"},"bugs":{"url":"https://github.com/ank1015/agent/issues"},"license":"UNLICENSED","homepage":"https://github.com/ank1015/agent#readme","keywords":["agents","gemini","google","llm","interactions","typescript"],"repository":{"type":"git","url":"git+https://github.com/ank1015/agent.git","directory":"packages/provider-gemini-spec"},"description":"Gemini provider static spec (config + per-call option types) for @ank1015/agents.","maintainers":[{"name":"ananya150","email":"ananyakhandelwal60@gmail.com"}],"readme":"# @ank1015/agents-provider-gemini-spec\n\nStatic Gemini provider metadata for the `@ank1015/agents` packages.\n\nThis package contains no live Gemini client. It provides provider identity, config types, an opinionated Gemini Interactions API option surface, provider-specific type augmentation, tool support helpers, native message typing, and a static model catalog.\n\n## Install\n\n```sh\npnpm add @ank1015/agents-provider-gemini-spec\n```\n\n## What This Package Provides\n\n- `GEMINI_PROVIDER` provider id.\n- `geminiProviderConfigSchema` for provider config validation.\n- `GeminiProviderOptions` for Gemini Interactions API request options not owned by the generic LLM layer.\n- `GeminiNativeMessage` for stateless Interactions responses with replayable `steps`.\n- `GEMINI_MODELS`, `GeminiModelId`, `getGeminiModel`, and `isGeminiModelId`.\n- `geminiToolDefinitionSchema` and `assertGeminiToolsSupported`.\n- Contract augmentation for `@ank1015/agents-contracts`.\n\n## Provider Config\n\nGemini provider config uses a secret reference for the API key:\n\n```ts\nimport {\n  GEMINI_PROVIDER,\n  geminiProviderConfigSchema,\n} from '@ank1015/agents-provider-gemini-spec';\n\nconst config = geminiProviderConfigSchema.parse({\n  provider: GEMINI_PROVIDER,\n  apiKey: {\n    type: 'env',\n    name: 'GEMINI_API_KEY',\n  },\n});\n```\n\nCallers that already have a key from another secret source can pass a direct value reference:\n\n```ts\nconst config = geminiProviderConfigSchema.parse({\n  provider: GEMINI_PROVIDER,\n  apiKey: {\n    type: 'value',\n    value: geminiKey,\n  },\n});\n```\n\n## Provider Options\n\n`GeminiProviderOptions` intentionally exposes a small Interactions API subset. The generic LLM layer owns `model`, `input`, `stream`, `system_instruction`, `tools`, `store`, and `previous_interaction_id`.\n\nThe option surface currently includes:\n\n- `generation_config.thinking_level`\n- `generation_config.thinking_summaries`\n- `generation_config.max_output_tokens`\n- `generation_config.tool_choice`\n- `generation_config.stop_sequences`\n- `generation_config.seed`\n- `generation_config.temperature`\n- `generation_config.top_p`\n- `generation_config.top_k`\n- `response_format` for text output and JSON-schema structured output.\n- `built_in_tools` for Gemini-managed tools: Google Search, Google Maps, Code Execution, URL Context, and File Search.\n\nGeneric `request.tools` remains function-tool only in v1. `assertGeminiToolsSupported` rejects generic custom grammar tools; use `providerOptions.response_format` with `mime_type: \"application/json\"` for structured output.\n\n`built_in_tools` is intentionally separate from `request.tools`:\n\n```ts\nconst providerOptions = {\n  built_in_tools: [\n    { type: 'google_search' },\n    { type: 'code_execution' },\n  ],\n};\n```\n\nThe Gemini runtime adapter will combine these Gemini-managed tools with converted generic function tools when building the Interactions API `tools` array.\n\n## Model Catalog\n\nRuntime support is catalog-only:\n\n| Model | Model id | Input | Context | Max output | Input / Cached Input / Output |\n| --- | --- | --- | --- | --- | --- |\n| Gemini 3.5 Flash | `gemini-3.5-flash` | Text, image | 1,048,576 tokens | 65,536 tokens | $1.50 / $0.15 / $9.00 |\n| Gemini 3.1 Pro Preview | `gemini-3.1-pro-preview` | Text, image | 1,048,576 tokens | 65,536 tokens | $2.00 / $0.20 / $12.00 up to 200k prompt tokens |\n| Gemini 3.1 Flash-Lite | `gemini-3.1-flash-lite` | Text, image | 1,048,576 tokens | 65,536 tokens | $0.25 / $0.025 / $1.50 |\n\nGemini 3.1 Pro Preview also includes `pricingTiers` metadata for prompts over 200k tokens: $4.00 input, $0.40 cached input, and $18.00 output per 1M tokens.\n\nAll models use `0` as the cache write cost because the shared usage model does not represent hourly cache storage costs.\n\n## Type Augmentation\n\nImporting this package augments `@ank1015/agents-contracts` so Gemini requests can narrow provider-specific fields:\n\n```ts\nimport type { LLMRequest } from '@ank1015/agents-contracts';\nimport type { GeminiProvider } from '@ank1015/agents-provider-gemini-spec';\n\nconst request: LLMRequest<GeminiProvider> = {\n  provider: 'gemini',\n  modelId: 'gemini-3.5-flash',\n  messages: [],\n};\n```\n\n## Versioning\n\nThis package is currently `0.1.1`. Until `1.0.0`, model metadata and provider option types may evolve as the surrounding agent runtime settles.\n","readmeFilename":"README.md"}