Skip to content

feat: add Cheaper Inference memory provider preset - #420

Merged
EyJunge1 merged 3 commits into
tickernelz:mainfrom
aiapienthusiast:cheaperinference-provider
Oct 21, 2026
Merged

EyJunge1 merged 3 commits into
tickernelz:mainfrom
aiapienthusiast:cheaperinference-provider

Conversation

@aiapienthusiast

Copy link
Copy Markdown
Contributor

Summary

Add a cheaper-inference memory provider preset.
It follows the atlas-cloud preset from #360.

Cheaper Inference is an OpenAI-compatible LLM gateway.

The preset reuses the OpenAI Chat Completions provider.
It only sets the endpoint, the default model, and the session provider tag.
A minimal config needs only the provider and an API key:

"memoryProvider": "cheaper-inference",
"memoryApiKey": "env://CHEAPER_INFERENCE_API_KEY",

memoryApiUrl defaults to https://api.cheaperinference.com/v1.
memoryModel defaults to gpt-5.4-mini.
If memoryApiKey is not set, CHEAPER_INFERENCE_API_KEY from the environment is used.

Details
  • src/services/ai/providers/cheaper-inference.ts: new provider class, same shape as atlas-cloud.ts.
  • ai-provider-factory.ts, provider-config.ts, session-types.ts, types/index.ts, config.ts: wire the new id like atlas-cloud.
  • config.ts: env key fallback and preset status handling, same as atlas-cloud.
  • opencode-mem.example.jsonc, config template, README.md and the 5 translated READMEs: preset docs and data-transfer note.
  • Tests: tests/cheaper-inference-provider.test.ts, plus cases in ai-provider-config.test.ts and config-resolution.test.ts.
  • Live check: gpt-5.4-mini returned a save_memories tool call through CheaperInferenceProvider.executeToolCall.

Test plan

  • Exercised the change locally (or N/A for docs/meta-only)
  • Noted any follow-up or known limitations

Checklist

  • Branch is based on main (do not open PRs from commits already on main)
  • bun test passes (or N/A)
  • bun run typecheck passes (or N/A)
  • bun run check passes (format + lint + typecheck; or N/A)
  • Docs / README updated when behavior or contribution process changes

@EyJunge1

Copy link
Copy Markdown
Collaborator

Reviewed the preset wiring against atlas-cloud: factory, config/env fallback, preset status, docs/i18n, and tests look complete and consistent.

Pushed a maintainer update onto this branch:

  • merged current main (resolves the dirty/conflict state from the README → i18n/ move)
  • tiny test wording fix

Focused provider/config tests + typecheck passed locally after the merge.

@EyJunge1
EyJunge1 merged commit b31c0bd into tickernelz:main Oct 21, 2026
1 check passed
@EyJunge1 EyJunge1 mentioned this pull request Oct 21, 2026
2 of 6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants