Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add model credential schema for Google provider #12851

Closed

Conversation

fujita-h
Copy link
Contributor

Summary

Fixes #12850

I added the model_credential_schema setting because without it the encrypted key cannot be decrypted.

for variable in model_credential_secret_variables:
if variable in provider_model_credentials:
try:
provider_model_credentials[variable] = encrypter.decrypt_token_with_decoding(
provider_model_credentials.get(variable),
self.decoding_rsa_key,
self.decoding_cipher_rsa,
)
except ValueError:
pass

I don't understand the correct role of model_credential_schema . If this could cause other issues, please fix the PR.

Checklist

Important

Please review the checklist below before submitting your pull request.

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. ⚙️ feat:model-runtime labels Jan 19, 2025
@kurokobo
Copy link
Contributor

#12850 (comment)

@fujita-h
Copy link
Contributor Author

I are also creating PR #12853 in another way. Please refer to it.

@fujita-h fujita-h closed this Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ feat:model-runtime size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API key error occurs when setting model load balancing with Google model
2 participants