feat: Add intelligent auto-router and enhanced integrations
- Add intelligent-router.sh hook for automatic agent routing - Add AUTO-TRIGGER-SUMMARY.md documentation - Add FINAL-INTEGRATION-SUMMARY.md documentation - Complete Prometheus integration (6 commands + 4 tools) - Complete Dexto integration (12 commands + 5 tools) - Enhanced Ralph with access to all agents - Fix /clawd command (removed disable-model-invocation) - Update hooks.json to v5 with intelligent routing - 291 total skills now available - All 21 commands with automatic routing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
27
dexto/packages/webui/components/hooks/useOpenRouter.ts
Normal file
27
dexto/packages/webui/components/hooks/useOpenRouter.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
import { client } from '@/lib/client';
|
||||
|
||||
/**
|
||||
* Validate an OpenRouter model ID against the registry.
|
||||
* Returns validation result with status and optional error.
|
||||
*/
|
||||
export function useValidateOpenRouterModel() {
|
||||
return useMutation({
|
||||
mutationFn: async (modelId: string) => {
|
||||
// URL-encode the model ID to handle slashes (e.g., anthropic/claude-3.5-sonnet)
|
||||
const encodedModelId = encodeURIComponent(modelId);
|
||||
const response = await client.api.openrouter.validate[':modelId'].$get({
|
||||
param: { modelId: encodedModelId },
|
||||
});
|
||||
if (!response.ok) {
|
||||
throw new Error(`Failed to validate model: ${response.status}`);
|
||||
}
|
||||
return await response.json();
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
// Export inferred types
|
||||
export type ValidateOpenRouterModelResult = Awaited<
|
||||
ReturnType<ReturnType<typeof useValidateOpenRouterModel>['mutateAsync']>
|
||||
>;
|
||||
Reference in New Issue
Block a user