Skip to content

Implement Morph, StepFun, and Inception AI adapters#765

Merged
ralyodio merged 1 commit into
profullstack:masterfrom
Echolonius:feat/ai-adapters-morph-stepfun-inception
Jul 8, 2026
Merged

Implement Morph, StepFun, and Inception AI adapters#765
ralyodio merged 1 commit into
profullstack:masterfrom
Echolonius:feat/ai-adapters-morph-stepfun-inception

Conversation

@Echolonius

Copy link
Copy Markdown
Contributor

Summary

  • Replaces the placeholder stubs for packages/ai/morph, packages/ai/stepfun, and packages/ai/inception with real implementations
  • All three follow the OpenAI-compatible chat-completions pattern already used by groq: defineAi config with a baseUrl override, redacted error messages on non-2xx responses, and usage token mapping to inputTokens/outputTokens
  • Base URLs and request/response shapes verified live against each provider before implementing (unauthenticated POST to /v1/chat/completions returns the expected OpenAI-style auth/validation error, confirming host + path):
    • Morph: https://api.morphllm.com/v1/chat/completions, model morph-v2
    • StepFun: https://api.stepfun.com/v1/chat/completions, model step-2-16k
    • Inception: https://api.inceptionlabs.ai/v1/chat/completions, model mercury

Test plan

  • Added unit tests for all three adapters mirroring packages/ai/groq/src/index.test.ts (dry-run short-circuit, request shape, base URL override, error redaction, missing-key throw)
  • CI: pnpm --filter @profullstack/sh1pt-ai-morph --filter @profullstack/sh1pt-ai-stepfun --filter @profullstack/sh1pt-ai-inception typecheck && pnpm vitest run packages/ai/morph/src/index.test.ts packages/ai/stepfun/src/index.test.ts packages/ai/inception/src/index.test.ts

Replace the three placeholder stubs with working OpenAI-compatible
chat completion clients, following the groq adapter's pattern
(config.baseUrl override, redacted error messages, usage token
mapping). Base URLs and endpoint shapes verified live against each
provider (api.morphllm.com, api.stepfun.com, api.inceptionlabs.ai).
Adds matching unit test coverage for each.
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

5 similar comments
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@ralyodio ralyodio merged commit a568b2f into profullstack:master Jul 8, 2026
4 checks passed
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