Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions config/omp/config.tpl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,40 @@ retry:

# Base delay between retries in milliseconds. Upstream default: 2000
baseDelayMs: 2000
# modelFallback

# Let retry recovery switch to the chains below. Upstream default: true
modelFallback: true
# fallbackChains

# Ordered alternates per chain key. The `default` chain is expanded to every
# model role without its own chain, so role turns fall back too.
#
# Candidates are the entries AFTER the current model in its chain, so a role
# whose model sits last in the chain it inherits has no candidates at all.
# The roles pinned to __GPT__ therefore get their own chain rather than
# inheriting `default`, which ends on __GPT__.
fallbackChains:
default:
- "openai-codex/__GPT_LUNA__"
- "openai-codex/__GPT_CODEX_SPARK__"
- "openai-codex/__GPT__"
slow:
- "openai-codex/__GPT_CODEX__"
- "openai-codex/__GPT_LUNA__"
- "cliproxyapi/__DEEPSEEK_FLASH__"
vision:
- "openai-codex/__GPT_CODEX__"
- "openai-codex/__GPT_LUNA__"
- "cliproxyapi/__DEEPSEEK_FLASH__"
plan:
- "openai-codex/__GPT_CODEX__"
- "openai-codex/__GPT_LUNA__"
- "cliproxyapi/__DEEPSEEK_FLASH__"
# fallbackRevertPolicy

# Return to the primary once its cooldown expires. Upstream default: cooldown-expiry
fallbackRevertPolicy: "cooldown-expiry"
# --- Compaction --------------------------------------------------------------
compaction:
# enabled
Expand Down
34 changes: 34 additions & 0 deletions config/omp/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,40 @@ retry:

# Base delay between retries in milliseconds. Upstream default: 2000
baseDelayMs: 2000
# modelFallback

# Let retry recovery switch to the chains below. Upstream default: true
modelFallback: true
# fallbackChains

# Ordered alternates per chain key. The `default` chain is expanded to every
# model role without its own chain, so role turns fall back too.
#
# Candidates are the entries AFTER the current model in its chain, so a role
# whose model sits last in the chain it inherits has no candidates at all.
# The roles pinned to gpt-5.6-sol therefore get their own chain rather than
# inheriting `default`, which ends on gpt-5.6-sol.
fallbackChains:
default:
- "openai-codex/gpt-5.6-luna"
- "openai-codex/gpt-5.3-codex-spark"
- "openai-codex/gpt-5.6-sol"
slow:
- "openai-codex/gpt-5.3-codex"
- "openai-codex/gpt-5.6-luna"
- "cliproxyapi/deepseek-v4-flash"
vision:
- "openai-codex/gpt-5.3-codex"
- "openai-codex/gpt-5.6-luna"
- "cliproxyapi/deepseek-v4-flash"
plan:
- "openai-codex/gpt-5.3-codex"
- "openai-codex/gpt-5.6-luna"
- "cliproxyapi/deepseek-v4-flash"
# fallbackRevertPolicy

# Return to the primary once its cooldown expires. Upstream default: cooldown-expiry
fallbackRevertPolicy: "cooldown-expiry"
# --- Compaction --------------------------------------------------------------
compaction:
# enabled
Expand Down
8 changes: 8 additions & 0 deletions config/pi/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,12 @@ _: {
source = ./moshi-hooks.ts;
force = true;
};
home.file.".pi/agent/fallback.json" = {
source = ./fallback.json;
force = true;
};
home.file.".pi/agent/extensions/fallback.ts" = {
source = ./fallback.ts;
force = true;
};
}
23 changes: 23 additions & 0 deletions config/pi/fallback.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"enabled": true,
"retry_on_errors": [
401,
404,
429,
500,
502,
503,
504
],
"retryable_error_patterns": [
"unknown provider for model"
],
"max_fallback_attempts": 5,
"cooldown_seconds": 60,
"notify_on_fallback": true,
"fallback_models": [
"cliproxyapi/gemma-4-31b-it",
"cliproxyapi/glm-4.7",
"cliproxyapi/free"
]
}
23 changes: 23 additions & 0 deletions config/pi/fallback.tpl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"enabled": true,
"retry_on_errors": [
401,
404,
429,
500,
502,
503,
504
],
"retryable_error_patterns": [
"unknown provider for model"
],
"max_fallback_attempts": 5,
"cooldown_seconds": 60,
"notify_on_fallback": true,
"fallback_models": [
"cliproxyapi/__GEMMA__",
"cliproxyapi/__GLM__",
"cliproxyapi/free"
]
}
Loading
Loading