/claim #279

Summary

  • Fix the existing Gemini/PaLM-compatible provider so generation options are sent in Google’s generationConfig request body instead of the Axios config object.
  • Export Gemini request/response TypeScript types and add a Palm2AI alias for the PaLM2/Gemini bounty API surface.
  • Add mocked unit coverage under src/ai/src/tests/palm2.
  • Add the required src/ai/src/testcases/palm2 Jsonnet prompt config.
  • Add a runnable Jsonnet-driven examples/palm2-chat example with no hardcoded prompt in TypeScript.

Requirement Checklist

  • Classes and TypeScript types added for PaLM2/Gemini API: yes
  • Unit testcases under a palm2 test path: yes
  • testcases/palm2 Jsonnet prompt config: yes
  • Example prompt lives in Jsonnet, not hardcoded in TypeScript: yes
  • Short demo included in this PR: yes
  • CLA signed and CI passing: yes

Validation

  • npx vitest run src/ai/src/tests/palm2/gemini.test.ts
  • npm run build
  • npm start from JS/edgechains/examples/palm2-chat

Demo

Short demo GIF:

PaLM2 Gemini demo

The example dry-runs without credentials and prints the Jsonnet-loaded chat options. Set GEMINI_API_KEY to call the live Google Generative Language API.

Full demo transcript, included so the output remains reviewable even if GitHub clips the embedded media:

EdgeChains #279 demo: PaLM2/Gemini Jsonnet example
Prompt, model, and generation settings are loaded from Jsonnet.
$ cd JS/edgechains/examples/palm2-chat
$ npm start
Loaded Jsonnet prompt:
Explain how EdgeChains can call Gemini through a typed provider in one sentence.
Loaded model:
gemini-pro
Dry-run request:
generationConfig.temperature = 0.2
generationConfig.maxOutputTokens = 128
No GEMINI_API_KEY found, so the example stops before the live API call.
Set GEMINI_API_KEY to call Google Generative Language API.
✓ npx vitest run src/ai/src/tests/palm2/gemini.test.ts

Claim

Total prize pool $25
Total paid $0
Status Pending
Submitted May 28, 2026
Last updated May 28, 2026

Contributors

JO

jonahsills

@jonahsills

100%

Sponsors

AR

Arakoo.ai

@arakoodev

$25