Repository navigation
Agent examples on cellb: a fake OpenAI-compatible model, pi and opencode in Durable Objects - #12
Merged
Merged
Conversation
…ode in Durable Objects - packages/fake-openai: a scripted OpenAI-compatible endpoint (chat completions streamed or not, text or tool calls, embeddings, model list; CORS open; every request recorded), with a CLI for celld dev. The Flue example's tests use it. - packages/agent-examples: pi's agent loop (@earendil-works/pi-agent-core) and opencode's workerd SDK (celld's example, with its model from an endpoint in the vars) in Durable Objects, tested on cellb against the fake model. - cellb: a Response given as another Response's init keeps its headers and statusText (the opencode SDK rebuilds responses that way; the spread lost the prototype's getters). - cellb: Node bundles resolve packages as celld deploy does (conditions workerd, worker, browser; then module and main): a package with only `main` did not resolve. - cellb: a `containers` config is reported in `unsupported`. - docs: a feature table against celld (WebSockets, Workers AI, Python, containers, agents). - CI runs the fake model's and the agent examples' tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SXJQA3LbggJHi5qZBpUKe8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
packages/fake-openai(new, private): a scripted OpenAI-compatible endpoint./v1/embeddingsand/v1/models, with CORS open, and records every request.celld dev(node packages/fake-openai/src/cli.ts 8787).packages/agent-examples(new, private), both tested on cellb (Node) against the fake model:@earendil-works/pi-agent-core+pi-ai) in a Durable Object with one tool. A prompt calls the tool and gets the follow-up reply; the transcript persists in storage and a second prompt continues it.examples/pineedsPiHarnessfrom a pkg.pr.new preview ofagents, which no published release contains and which some networks block, so this version uses pi's published packages instead.examples/opencode, with anendpointprovider (@ai-sdk/openai-compatible, base URL fromOPENCODE_BASE_URL) instead of opencode's free registry model. All 8 SDK steps succeed and the reply is the fake model's.Responseused as anotherResponse's init (new Response(body, response)) kept onlystatus: the spread dropped the prototype gettersheadersandstatusText. opencode's SDK does this and failed withClientError: UnsupportedContentType. Added a regression test in p07w.celld deploydoes: conditionsworkerd,worker,browser, thenmoduleandmain. The neutral platform has no main fields, so packages with onlymain(opencode's@smithy/*) did not resolve.containersconfig is reported inunsupportedinstead of being silently ignored (test in p13).docs/celld-compatibility.mdagainst CellD, covering WebSockets, Workers AI, Python, containers and agent frameworks;docs/gaps.mdis updated.Tests
fake-openaiagent-examplesTypecheck and Biome are clean.
Note
The Node bundler change overlaps the pending switch to
@statewalker/webrun-bundler(branchccr-ab3c0d30-6du8do-webrun-bundler), which resolves these fields itself. Whichever merges second needs a small merge innode-project.ts.Generated by Claude Code