MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / providerAt

Method providerAt

app/src/AI/Assistant.cpp:793–814  ·  view source on GitHub ↗

* @brief Returns the Provider* matching the integer index, or nullptr. */

Source from the content-addressed store, hash-verified

791 * @brief Returns the Provider* matching the integer index, or nullptr.
792 */
793AI::Provider* AI::Assistant::providerAt(int idx) const
794{
795 switch (static_cast<ProviderId>(idx)) {
796 case ProviderId::Anthropic:
797 return m_anthropic.get();
798 case ProviderId::OpenAI:
799 return m_openai.get();
800 case ProviderId::Gemini:
801 return m_gemini.get();
802 case ProviderId::DeepSeek:
803 return m_deepseek.get();
804 case ProviderId::OpenRouter:
805 return m_openrouter.get();
806 case ProviderId::Groq:
807 return m_groq.get();
808 case ProviderId::Mistral:
809 return m_mistral.get();
810 case ProviderId::Local:
811 return m_local.get();
812 }
813 return nullptr;
814}
815
816/**
817 * @brief Returns true when the given provider needs a stored API key.

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected