model-providers
Skill0 starsChanged 4 days agoMITView on GitHub
Which model servers the assistant can talk to, what a preset sets, and where a model's abilities are configured. Use when choosing, adding or debugging a model provider, a preset, tool calling, or "the assistant cannot reach the model".
2 other projects use a version of this.
Adopted by
Most recently taken up by
- fmind/dottheir own version, first seen Nov 8, 2026
- fmind/dotfilestheir own version, first seen Nov 8, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- fmind/dot★ 13same name
- fmind/dotfiles★ 13same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository29 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- accessibilitySkill
- actionsSkill
- adding-a-featureSkill
- agent-workflowSkill
- app-contextSkill
- approval-and-safetySkill
- backend-proxySkill
- background-workSkill
- build-an-appSkill
- capture-learningsSkill
- clean-architectureSkill
- customizing-the-assistantSkill
- delegate-to-agentSkill
- edit-boundariesSkill
- i18n-and-rtlSkill
- performanceSkill
- permissions-and-platformSkill
- read-the-docsSkill
- reliable-mutationsSkill
- routingSkill
- secretsSkill
- state-managementSkill
- storing-dataSkill
- testingSkill
- ui-designSkill
- upgrade-the-frameworkSkill
- verifySkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Don't load this for keeping the API key safe.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Model providers
Don't load this for keeping the API key safe; see secrets. For a server that holds the key, see backend-proxy.
Rule
The app reaches a model only through an LlmProvider built by buildProvider(presetId:, baseUrl:, apiKey:) from packages/flutter_agentify_core/lib/src/llm/provider_presets.dart. What a model can do (toolCalling, streaming, contextWindow, maxOutputTokens) belongs to the ModelConfig, never to the provider. Enforced by the provider conformance tests in packages/flutter_agentify_core/test/llm/conformance.dart, run by openai_compatible_provider_test.dart and anthropic_provider_test.dart in the same folder.
Why
One Ollama server can host a model with tool calling and one without. If abilities sat on the provider, the second model would be sent tools it cannot use. Every provider must also behave the same (stream text and tool calls, end with one LlmDone, report failures as LlmError), so the agent loop never needs to know which one it has.
How
- Where the model runs is set in
lib/ai/assistant_setup.dart:ModelMode.server,ModelMode.onDeviceorModelMode.both.lib/ai/model_route.dartpicks who answers the next message (AnsweredBy); the route changes only between replies.ServerSetupholds the server's defaults;userEditable: falsemakes them final and leavesset_assistant_providerandset_api_keyout of the registry. The Flutter Agentify guide Choose where the model runs explains the modes.
<!-- @on-device:begin -->- The model inside the app is
packages/flutter_agentify_on_device(only in projects set up with--model bothoron-device):EdgeAiEngine,OnDeviceProviderand thegemma4E2bspec. Its lifecycle isOnDeviceModelControllerin core. Test withFakeOnDeviceEngineandInMemoryLoadMarkerfrompackage:flutter_agentify_core/testing.dart; never download the model in a test.
<!-- @on-device:end -->- Presets:
ollama,lm_studio,openai,openrouter,gemini,anthropic,custom. Everything exceptanthropicis anOpenAiCompatibleProvider;customstarts with an empty address.keyUseon each preset says whether it takes a key:noneforollamaandlm_studio,optionalforcustom,requiredfor the hosted ones. Each preset keeps its own key. - Each preset carries
defaults, aModelConfig.lib/ai/assistant_providers.dartcopies it with the saved model name,toolCallingandcontextWindow. The settings form (lib/presentation/settings/assistant_settings_section.dart) stores only the values that differ from the preset. - Small context windows: when the tool list would exceed
AgentConfig.toolSearchShare(default 0.25) of the window, the session sends only the best matches plus atool_searchtool (packages/flutter_agentify_core/doc/agent-loop.md). Give an actionsearchHintsso it is found. - Answer-only mode: when the model has
toolCalling: false, or the server answers that tools are unsupported, the session sends no tools and the chat showsanswerOnlyNotice. Do not work around it; turn the switch off for that model. - A phone cannot reach the computer's
localhost. On a real device or emulator, the Ollama and LM Studio presets need the computer's address on the network (for examplehttp://192.168.1.20:11434/v1), and the server must listen on that interface. Android emulators use10.0.2.2for the host machine. Seepermissions-and-platformfor the cleartext and local-network settings this needs. - Web: the browser enforces CORS. Use a server that sends CORS headers, or your own proxy (
backend-proxy). No key is entered or stored on web, so the settings form leaves out the presets whosekeyUseisrequired. - Adding a provider means a class implementing
LlmProvider, a row in the conformance run, and a preset. The full contract is inpackages/flutter_agentify_core/doc/model-providers.md.
Anti-patterns
- Hard-coding
toolCalling: truefor a provider instead of for a model. - Putting a model name or key in source to "make the preset work".
- Treating a plain
LlmErroras final: checkretryable,contextOverflowandtoolsUnsupportedfirst. - Testing against a real server. Use
ScriptedProviderfrompackage:flutter_agentify_core/testing.dart(seetesting).
Verification
cd packages/flutter_agentify_core && dart test test/llmruns the conformance tests andprovider_presets_test.dart.test/presentation/settings/assistant_settings_section_test.dartcovers the settings form.test/ai/model_route_test.dartandtest/ai/assistant_setup_test.dartcover the modes and the setup file.
<!-- @on-device:begin -->tool/measure_on_device.sh -d <device>measures the in-app model on a real device.
<!-- @on-device:end -->tool/check.shruns all of it (seeverify).
Related skills
secrets— where the key livesbackend-proxy— when the key must stay on a servercustomizing-the-assistant— instructions and chat texttesting— scripting a model in tests
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

