AIToday
Large Language ModelsAI Coding AssistantsZenn AI/MLPublished: Nov 22, 2026, 04:00 JST

Free tier of 月3,000リクエスト shapes game's AI secretary design

Send on LINE
Free tier of 月3,000リクエスト shapes game's AI secretary design

3 Key Points

  1. What happened

    The developer wired Sakura's AI Engine into an indie space-company game as a cat-eared secretary, initially considering letting the AI steer the ship before rejecting that role as slower than buttons and wasteful of a shared 月3,000リクエスト free quota.

  2. Why it matters

    The AI is fenced off from game controls and given only the game's own status text and real planetary data, so players keep a working game once the free quota disappears.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

By signing up you agree to the Terms of Service and Privacy Policy.

Context & Analysis

The project sits on Sakura's AI Engine, which the developer notes uses the same format as OpenAI, so the integration fit in a single file. The game is built with Three.js and Vite and leans on real planetary data — solar power yields about 43% on Mars and about 4% on Jupiter, calculated from NASA's Planetary Fact Sheet — which is why the developer worried that an AI misstating numbers would damage the game's core selling point.

The four branch managers (Mikage on the Moon, Akane on Mars, Minato on Europa, Nagi on Titan) all run on the same model and differ only in system prompt. Each prompt supplies sample lines for the same scenes, and the server picks the persona from a name list rather than trusting the browser, so a system prompt cannot be injected from the client. In a four-way test, the same buildings produced surplus on the Moon and Mars but shortfalls on Europa and Titan, matching the on-screen power figures.

Failures were kept in the write-up: an early reply invented a mission-reward mechanic and pointed to a non-existent button, fixed by adding the game's money-making rules and a list of on-screen controls to the prompt. The developer also says an unlisted number slipped through once, and that browser-side limits can be bypassed by clearing storage — accepted because removing the key restores the original game.

FAQ
How does the game keep working when the free tier runs out?
The AI switches on or off based only on whether the SAKURA_AI_API_KEY environment variable is set. Remove the key and redeploy, and the game falls back to its original fixed lines with no code changes.
What limits keep the 月3,000リクエスト free quota from being used up?
Fixed commands never reach the AI, messages are capped at 200 characters, each browser gets 30 calls a day, and the server allows 10 calls a minute per sender. Failed calls fall back to fixed text.
Which model did the developer pick and why?
gpt-oss-120b was chosen after a one-shot, six-question comparison. It answered in 0.4–1.3 seconds and refused role-change instructions, while llm-jp-3.1-8x13b-instruct4 took 2.5–4.7 seconds and gave an unlisted, incorrect number.
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

By signing up you agree to the Terms of Service and Privacy Policy.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleLangChain lays out a "knowledge factory" for AI agents